diff options
| author | Luc Donnet | 2018-03-03 18:42:45 +0100 |
|---|---|---|
| committer | GitHub | 2018-03-03 18:42:45 +0100 |
| commit | 3c57aa087b6eb30095a4e99f19fbb3179d938d80 (patch) | |
| tree | f653e0d53438dbef320679fdb82847d831cef6d4 /spec | |
| parent | 6c4063c9e37e0afd3c3c4e980144aa54710062a7 (diff) | |
| parent | 72312d258101d06c5f608502f5db1d258583924a (diff) | |
| download | chouette-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.rb | 15 |
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 |
