diff options
| author | Robert | 2017-11-30 18:33:36 +0100 |
|---|---|---|
| committer | Robert | 2017-11-30 18:33:36 +0100 |
| commit | a2896b1db4db22eef587c2ae801c7a0d393c729f (patch) | |
| tree | 2b67a393d4e975e5924e9235b183b70e93b0c3ee /spec | |
| parent | 4759cd3dff823a619492ee2c5d532cc2dfa07266 (diff) | |
| download | chouette-core-a2896b1db4db22eef587c2ae801c7a0d393c729f.tar.bz2 | |
Fixes: #5130@0.5h; Spec added, migration added
Diffstat (limited to 'spec')
| -rw-r--r-- | spec/models/compliance_check_set_spec.rb | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/spec/models/compliance_check_set_spec.rb b/spec/models/compliance_check_set_spec.rb index fbf0f035b..b981a68bb 100644 --- a/spec/models/compliance_check_set_spec.rb +++ b/spec/models/compliance_check_set_spec.rb @@ -5,7 +5,6 @@ RSpec.describe ComplianceCheckSet, type: :model do expect(FactoryGirl.build(:compliance_check_set)).to be_valid end - it { should belong_to :referential } it { should belong_to :workbench } it { should belong_to :compliance_control_set } @@ -91,4 +90,13 @@ RSpec.describe ComplianceCheckSet, type: :model do expect(check_set.update_status).to be true end end + + describe 'possibility to delete the associated compliance_control_set' do + let!(:compliance_check_set) { create :compliance_check_set } + + it do + expect{ compliance_check_set.compliance_control_set.delete } + .to change{ ComplianceControlSet.count }.by(-1) + end + end end |
