aboutsummaryrefslogtreecommitdiffstats
path: root/spec
diff options
context:
space:
mode:
authorLuc Donnet2018-05-02 15:44:35 +0200
committerGitHub2018-05-02 15:44:35 +0200
commitfca877efdd8087959f721c2bb4af2d018e3e910a (patch)
tree2255bd67ac90476d137245e2f70d4df3c1802871 /spec
parent8631ff6b59439b9086f7cea2edf264f1fd305725 (diff)
parent979fc1c749282a97407bc5e000103f994a28ce73 (diff)
downloadchouette-core-fca877efdd8087959f721c2bb4af2d018e3e910a.tar.bz2
Merge pull request #546 from af83/6572-make-new-referentials-pending
6572 Create Referentials in a pending state
Diffstat (limited to 'spec')
-rw-r--r--spec/controllers/referentials_controller_spec.rb1
-rw-r--r--spec/models/referential/referential_oid_format_from_wkbch_spec.rb3
-rw-r--r--spec/models/referential_spec.rb1
3 files changed, 4 insertions, 1 deletions
diff --git a/spec/controllers/referentials_controller_spec.rb b/spec/controllers/referentials_controller_spec.rb
index acab3abd9..8edd8699f 100644
--- a/spec/controllers/referentials_controller_spec.rb
+++ b/spec/controllers/referentials_controller_spec.rb
@@ -119,6 +119,7 @@ describe ReferentialsController, :type => :controller do
it "creates the new referential" do
expect{request}.to change{Referential.count}.by 1
expect(Referential.last.name).to eq "Duplicated"
+ expect(Referential.last.state).to eq :pending
end
it "displays a flash message" do
diff --git a/spec/models/referential/referential_oid_format_from_wkbch_spec.rb b/spec/models/referential/referential_oid_format_from_wkbch_spec.rb
index 6783ab55d..a693e80c9 100644
--- a/spec/models/referential/referential_oid_format_from_wkbch_spec.rb
+++ b/spec/models/referential/referential_oid_format_from_wkbch_spec.rb
@@ -58,7 +58,8 @@ RSpec.describe Referential do
stop_area_referential: source.stop_area_referential,
created_from: source,
objectid_format: source.objectid_format,
- metadatas: source.metadatas.map { |m| ReferentialMetadata.new_from(m, functional_scope) })
+ metadatas: source.metadatas.map { |m| ReferentialMetadata.new_from(m, functional_scope) },
+ ready: false)
described_class.new_from( source, functional_scope )
end
diff --git a/spec/models/referential_spec.rb b/spec/models/referential_spec.rb
index eb9c2e338..720cec48c 100644
--- a/spec/models/referential_spec.rb
+++ b/spec/models/referential_spec.rb
@@ -203,6 +203,7 @@ describe Referential, :type => :model do
it 'should create a Referential' do
ref
expect { saved_clone }.to change{Referential.count}.by(1)
+ expect(saved_clone.state).to eq :pending
end
xit 'should create a ReferentialCloning' do