diff options
| author | Teddy Wing | 2017-12-05 12:06:45 +0100 |
|---|---|---|
| committer | Teddy Wing | 2017-12-05 12:18:24 +0100 |
| commit | 1098e24f15b235dce127f0398adac4bbf7cfe463 (patch) | |
| tree | c3e7791193d8407e9d52837c0f7fd5927acc0b2a | |
| parent | 0403fa61dd59be6aa96ecb1ef2b99b65ec656aaf (diff) | |
| download | chouette-core-1098e24f15b235dce127f0398adac4bbf7cfe463.tar.bz2 | |
referential_lock_during_creation_spec: Remove extra whitespace
Refs #5024
| -rw-r--r-- | spec/models/referential/referential_lock_during_creation_spec.rb | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/spec/models/referential/referential_lock_during_creation_spec.rb b/spec/models/referential/referential_lock_during_creation_spec.rb index ec2471015..1e36bd976 100644 --- a/spec/models/referential/referential_lock_during_creation_spec.rb +++ b/spec/models/referential/referential_lock_during_creation_spec.rb @@ -1,28 +1,28 @@ RSpec.describe Referential, type: :model do - + context "when two identical Referentials are created, only one is saved" do let( :workbench ){ create :workbench } it "works synchronously" do - referential_1 = build( - :referential, - workbench: workbench, - organisation: workbench.organisation - ) - referential_2 = referential_1.dup - referential_2.slug = "#{referential_1.slug}_different" + referential_1 = build( + :referential, + workbench: workbench, + organisation: workbench.organisation + ) + referential_2 = referential_1.dup + referential_2.slug = "#{referential_1.slug}_different" - metadata_1 = build(:referential_metadata) - metadata_2 = metadata_1.dup + metadata_1 = build(:referential_metadata) + metadata_2 = metadata_1.dup - referential_1.metadatas << metadata_1 - referential_2.metadatas << metadata_2 + referential_1.metadatas << metadata_1 + referential_2.metadatas << metadata_2 - referential_1.save - referential_2.save + referential_1.save + referential_2.save - expect(referential_1).to be_persisted - expect(referential_2).not_to be_persisted + expect(referential_1).to be_persisted + expect(referential_2).not_to be_persisted end it "works asynchronously", truncation: true do |
