aboutsummaryrefslogtreecommitdiffstats
path: root/spec/controllers/referentials_controller_spec.rb
diff options
context:
space:
mode:
authorGuillaume2017-11-08 14:44:36 +0100
committerGuillaume2017-11-08 14:44:36 +0100
commit3f8b085393351ed190cf071833d877dc5ea95946 (patch)
tree265ee2e3124406d4ca4107ea882781255a11a5d2 /spec/controllers/referentials_controller_spec.rb
parent87642d0d28328f0e6e3a1928d6b6edbcdab72f4a (diff)
downloadchouette-core-3f8b085393351ed190cf071833d877dc5ea95946.tar.bz2
filter compliance_control_set by organisation on valisate referential and add specs
Diffstat (limited to 'spec/controllers/referentials_controller_spec.rb')
-rw-r--r--spec/controllers/referentials_controller_spec.rb10
1 files changed, 9 insertions, 1 deletions
diff --git a/spec/controllers/referentials_controller_spec.rb b/spec/controllers/referentials_controller_spec.rb
index a3be0dbd1..cc01727d1 100644
--- a/spec/controllers/referentials_controller_spec.rb
+++ b/spec/controllers/referentials_controller_spec.rb
@@ -22,4 +22,12 @@ describe ReferentialsController, :type => :controller do
end
end
-end
+ describe 'GET select_compliance_control_set' do
+ it 'gets compliance control set for current organisation' do
+ compliance_control_set = create(:compliance_control_set, organisation: @user.organisation)
+ create(:compliance_control_set)
+ get :select_compliance_control_set, referential_id: referential.id
+ expect(assigns[:compliance_control_sets]).to eq([compliance_control_set])
+ end
+ end
+ end