aboutsummaryrefslogtreecommitdiffstats
path: root/spec
diff options
context:
space:
mode:
authorXinhui2017-09-05 12:25:48 +0200
committerXinhui2017-09-05 12:26:33 +0200
commit6b0b5be57f3c018f3ed19ddefb20d7c528d7ee3d (patch)
treeb147def76bbfcab1238c996d22555201456d82b9 /spec
parent70e8e93b0ebf4596c0ffd64620415db2450f4595 (diff)
downloadchouette-core-6b0b5be57f3c018f3ed19ddefb20d7c528d7ee3d.tar.bz2
Model ComplianceControlSet
Refs #4383
Diffstat (limited to 'spec')
-rw-r--r--spec/factories/compliance_control_sets.rb6
-rw-r--r--spec/models/compliance_control_set_spec.rb9
2 files changed, 15 insertions, 0 deletions
diff --git a/spec/factories/compliance_control_sets.rb b/spec/factories/compliance_control_sets.rb
new file mode 100644
index 000000000..f322816ed
--- /dev/null
+++ b/spec/factories/compliance_control_sets.rb
@@ -0,0 +1,6 @@
+FactoryGirl.define do
+ factory :compliance_control_set do
+ sequence(:name) { |n| "Compliance control set #{n}" }
+ organisation
+ end
+end
diff --git a/spec/models/compliance_control_set_spec.rb b/spec/models/compliance_control_set_spec.rb
new file mode 100644
index 000000000..fb46bc65a
--- /dev/null
+++ b/spec/models/compliance_control_set_spec.rb
@@ -0,0 +1,9 @@
+require 'rails_helper'
+
+RSpec.describe ComplianceControlSet, type: :model do
+ it 'should have a valid factory' do
+ expect(FactoryGirl.build(:compliance_control_set)).to be_valid
+ end
+
+ it { should belong_to :organisation }
+end