diff options
| author | cedricnjanga | 2018-02-28 23:48:47 -0800 | 
|---|---|---|
| committer | cedricnjanga | 2018-02-28 23:48:47 -0800 | 
| commit | 72312d258101d06c5f608502f5db1d258583924a (patch) | |
| tree | 6aab730bd53248ef99ae118ff152c7b1f29b51b8 /spec/features | |
| parent | 4acb5a53da2995aacc7b6ce2c802ad16fa563bf8 (diff) | |
| download | chouette-core-72312d258101d06c5f608502f5db1d258583924a.tar.bz2 | |
Refs #6044 Add spec to check that CCSet#index only dislays objets from user orga6044_add_ccset_spec_affectation
- Small change in ComplianceControlSetsHelper#organisations_filters_values to avoid errors
- Add spec
Diffstat (limited to 'spec/features')
| -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 | 
