diff options
| author | Teddy Wing | 2017-12-06 15:01:02 +0100 |
|---|---|---|
| committer | Teddy Wing | 2017-12-06 15:01:02 +0100 |
| commit | 0ec72aa1ce6598f48943df33827a6d700ee15153 (patch) | |
| tree | 8ea052e2ada077347ece6e5726dc2fd8fe058b05 | |
| parent | b881b679d83441fff5dfde2d76430c2b97d3500b (diff) | |
| download | chouette-core-0ec72aa1ce6598f48943df33827a6d700ee15153.tar.bz2 | |
referential_lock spec: Don't create unnecessary referential
The factory for `referential_metadata` was creating an unnecessary
`Referential` object since it has an association set up. This was
causing the test to fail because that referential's schema wasn't
getting cleaned in the `ensure` block. Don't create that referential to
avoid the error.
Refs #5024
| -rw-r--r-- | spec/models/referential/referential_lock_during_creation_spec.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/spec/models/referential/referential_lock_during_creation_spec.rb b/spec/models/referential/referential_lock_during_creation_spec.rb index 1e36bd976..0002af549 100644 --- a/spec/models/referential/referential_lock_during_creation_spec.rb +++ b/spec/models/referential/referential_lock_during_creation_spec.rb @@ -36,7 +36,7 @@ RSpec.describe Referential, type: :model do referential_2.slug = "#{referential_1.slug}_different" referential_3 = nil - metadata_1 = build(:referential_metadata) + metadata_1 = build(:referential_metadata, referential: nil) metadata_2 = metadata_1.dup referential_1.metadatas << metadata_1 |
