aboutsummaryrefslogtreecommitdiffstats
path: root/spec
diff options
context:
space:
mode:
authorLuc Donnet2018-03-03 18:42:45 +0100
committerGitHub2018-03-03 18:42:45 +0100
commit3c57aa087b6eb30095a4e99f19fbb3179d938d80 (patch)
treef653e0d53438dbef320679fdb82847d831cef6d4 /spec
parent6c4063c9e37e0afd3c3c4e980144aa54710062a7 (diff)
parent72312d258101d06c5f608502f5db1d258583924a (diff)
downloadchouette-core-3c57aa087b6eb30095a4e99f19fbb3179d938d80.tar.bz2
Merge pull request #356 from af83/6044_add_ccset_spec_affectation
Refs #6044 Add spec to check that CCSet#index only dislays objets fro…
Diffstat (limited to 'spec')
-rw-r--r--spec/features/compliance_control_sets_spec.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/spec/features/compliance_control_sets_spec.rb b/spec/features/compliance_control_sets_spec.rb
index 36dc5c2a9..0f4597db3 100644
--- a/spec/features/compliance_control_sets_spec.rb
+++ b/spec/features/compliance_control_sets_spec.rb
@@ -8,6 +8,9 @@ RSpec.describe "ComplianceControlSets", type: :feature do
let( :control_set ){ create :compliance_control_set, organisation: organisation }
let( :controls ){ control_set.compliance_controls }
+ let(:other_orga) { create :organisation }
+ let(:other_control_cset) { create :compliance_control_set, organisation: other_orga }
+
let(:blox){
2.times.map{ | _ | create :compliance_control_block, compliance_control_set: control_set }
}
@@ -95,6 +98,18 @@ RSpec.describe "ComplianceControlSets", type: :feature do
end
+ describe 'index' do
+
+ before do
+ visit compliance_control_sets_path
+ end
+
+ it "only showw compliance control sets from user organisation" do
+ expect(page).not_to have_content (other_orga.name)
+ expect(page).to have_content (organisation.name)
+ end
+ end
+
def make_control ccblock=nil, times: 1, severity: :warning
times.times do
make_one_control ccblock, severity