diff options
| author | Robert | 2017-10-17 12:28:35 +0200 |
|---|---|---|
| committer | Robert | 2017-10-17 12:28:35 +0200 |
| commit | 0b744d48fdc84445f593114fe61baaafca4e17f4 (patch) | |
| tree | d15b8473b79cdd7fd809f3a942b2acec2cb8a2f9 /spec/lib | |
| parent | bacb624a9d0415337dfab6418de240cd2afa7305 (diff) | |
| download | chouette-core-0b744d48fdc84445f593114fe61baaafca4e17f4.tar.bz2 | |
Fixes: #4727@0.1h; Added organisation to clone for and rebased master4727-clone-compliance-control-set
Diffstat (limited to 'spec/lib')
| -rw-r--r-- | spec/lib/compliance_control_set_cloner_spec.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/spec/lib/compliance_control_set_cloner_spec.rb b/spec/lib/compliance_control_set_cloner_spec.rb index ca359536a..4305ec70b 100644 --- a/spec/lib/compliance_control_set_cloner_spec.rb +++ b/spec/lib/compliance_control_set_cloner_spec.rb @@ -2,6 +2,8 @@ RSpec.describe ComplianceControlSetCloner do subject{ described_class.new } + let( :new_organisation ){ create :organisation } + let( :source_set ){ create :compliance_control_set } let( :set_prefix ){ I18n.t('compliance_control_sets.clone.prefix') } let( :block_prefix ){ I18n.t('compliance_control_blocks.clone.prefix') } @@ -80,11 +82,11 @@ RSpec.describe ComplianceControlSetCloner do # # Execute copy and keep count counts = object_counts - subject.copy(source_set.id) + subject.copy(source_set.id, new_organisation.id) delta = count_diff counts, object_counts # Check correctly copied set - expect(target_set.organisation).to eq(source_set.organisation) + expect(target_set.organisation).to eq(new_organisation) expect(target_set.name).to eq( [set_prefix, source_set.name].join(' ') ) # Check correctly copied controls |
