diff options
| author | Alban Peignier | 2017-12-14 21:40:53 +0100 |
|---|---|---|
| committer | Alban Peignier | 2018-01-05 10:23:29 +0100 |
| commit | 54c202a781a189c34390e699a19e7ebae9c03442 (patch) | |
| tree | 16043ffe25d76919a06506bd7ce22ad91cdab49f /spec/models | |
| parent | 638a1864a027226c9c0b26b01ca80a85435387f7 (diff) | |
| download | chouette-core-54c202a781a189c34390e699a19e7ebae9c03442.tar.bz2 | |
Ignore detect_overlapped_referentials when Referential is into a ReferentialSuite. Refs #5299
Diffstat (limited to 'spec/models')
| -rw-r--r-- | spec/models/referential_spec.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/spec/models/referential_spec.rb b/spec/models/referential_spec.rb index 7816e7232..45881333f 100644 --- a/spec/models/referential_spec.rb +++ b/spec/models/referential_spec.rb @@ -125,4 +125,19 @@ describe Referential, :type => :model do end end + context "used in a ReferentialSuite" do + before do + ref.referential_suite_id = 42 + end + + it "return true to in_referential_suite?" do + expect(ref.in_referential_suite?).to be(true) + end + + it "don't use detect_overlapped_referentials in validation" do + expect(ref).to_not receive(:detect_overlapped_referentials) + ref.valid? + end + end + end |
