diff options
| author | Zog | 2018-05-03 10:13:34 +0200 |
|---|---|---|
| committer | Zog | 2018-05-03 10:13:34 +0200 |
| commit | 7839c6cc052156383d17be27df864f92f40f273c (patch) | |
| tree | a21377ce2278fcc9f940055575a3a680ee726bc2 /spec | |
| parent | 6f7865568e74f8268d067c4f961ece9dd4a76d41 (diff) | |
| download | chouette-core-7839c6cc052156383d17be27df864f92f40f273c.tar.bz2 | |
Refs #6920; Fix typo
Diffstat (limited to 'spec')
| -rw-r--r-- | spec/models/referential_spec.rb | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/spec/models/referential_spec.rb b/spec/models/referential_spec.rb index 720cec48c..2ca0e737d 100644 --- a/spec/models/referential_spec.rb +++ b/spec/models/referential_spec.rb @@ -29,6 +29,14 @@ describe Referential, :type => :model do end end + context "creation" do + subject(:referential) { Referential.create name: "test", objectid_format: :netex, organisation: create(:organisation), line_referential: create(:line_referential), stop_area_referential: create(:stop_area_referential) } + it "should activate by default" do + expect(referential).to be_valid + expect(referential.state).to eq :active + end + end + context ".last_operation" do subject(:operation){ referential.last_operation } it "should return nothing" do @@ -110,7 +118,8 @@ describe Referential, :type => :model do context "the scopes" do it "should filter the referentials" do - referential = create :referential, ready: false + referential = create :referential + referential.pending! expect(Referential.pending).to include referential expect(Referential.failed).to_not include referential expect(Referential.active).to_not include referential |
