aboutsummaryrefslogtreecommitdiffstats
path: root/spec
diff options
context:
space:
mode:
authorZog2018-05-03 10:13:34 +0200
committerZog2018-05-03 10:13:34 +0200
commit7839c6cc052156383d17be27df864f92f40f273c (patch)
treea21377ce2278fcc9f940055575a3a680ee726bc2 /spec
parent6f7865568e74f8268d067c4f961ece9dd4a76d41 (diff)
downloadchouette-core-7839c6cc052156383d17be27df864f92f40f273c.tar.bz2
Refs #6920; Fix typo
Diffstat (limited to 'spec')
-rw-r--r--spec/models/referential_spec.rb11
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