From 7839c6cc052156383d17be27df864f92f40f273c Mon Sep 17 00:00:00 2001 From: Zog Date: Thu, 3 May 2018 10:13:34 +0200 Subject: Refs #6920; Fix typo --- spec/models/referential_spec.rb | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'spec') 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 -- cgit v1.2.3