aboutsummaryrefslogtreecommitdiffstats
path: root/spec
diff options
context:
space:
mode:
Diffstat (limited to 'spec')
-rw-r--r--spec/models/compliance_check_set_spec.rb10
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