aboutsummaryrefslogtreecommitdiffstats
path: root/spec
diff options
context:
space:
mode:
authorAlban Peignier2018-03-20 23:00:41 +0100
committerAlban Peignier2018-03-20 23:00:41 +0100
commitc9f3f819c64b448c8647670a9de3f2ea1763cc8f (patch)
treea40cbf6b928bff43f96454cfd3a3b1ee0aa2b3f6 /spec
parent7889ea3f2e8051140b703a88ee9ea6194f5bf3f7 (diff)
downloadchouette-core-c9f3f819c64b448c8647670a9de3f2ea1763cc8f.tar.bz2
Don't use Import::Base#status_changed? into #notify_parent (status can be changed by java side). Refs #6243
Diffstat (limited to 'spec')
-rw-r--r--spec/models/export/base_spec.rb4
-rw-r--r--spec/models/import/import_spec.rb4
2 files changed, 4 insertions, 4 deletions
diff --git a/spec/models/export/base_spec.rb b/spec/models/export/base_spec.rb
index edc0788f2..da52fa1f3 100644
--- a/spec/models/export/base_spec.rb
+++ b/spec/models/export/base_spec.rb
@@ -114,7 +114,7 @@ RSpec.describe Export::Base, type: :model do
allow(netex_export).to receive(:update)
expect(workgroup_export).to receive(:child_change)
- netex_export.status = :foo
+ netex_export.notified_parent_at = nil
netex_export.notify_parent
end
@@ -122,7 +122,7 @@ RSpec.describe Export::Base, type: :model do
allow(workgroup_export).to receive(:child_change)
Timecop.freeze(Time.now) do
- netex_export.status = :bar
+ netex_export.notified_parent_at = nil
netex_export.notify_parent
expect(netex_export.notified_parent_at.strftime('%Y-%m-%d %H:%M:%S.%3N')).to eq Time.now.strftime('%Y-%m-%d %H:%M:%S.%3N')
diff --git a/spec/models/import/import_spec.rb b/spec/models/import/import_spec.rb
index 102c0e1d6..ab8fcc9c0 100644
--- a/spec/models/import/import_spec.rb
+++ b/spec/models/import/import_spec.rb
@@ -115,14 +115,14 @@ RSpec.describe Import::Base, type: :model do
allow(netex_import).to receive(:update)
expect(workbench_import).to receive(:child_change)
- netex_import.status = :foo
+ netex_import.notified_parent_at = nil
netex_import.notify_parent
end
it "must update the :notified_parent_at field of the child import" do
allow(workbench_import).to receive(:child_change)
Timecop.freeze(Time.now) do
- netex_import.status = :bar
+ netex_import.notified_parent_at = nil
netex_import.notify_parent
expect(netex_import.notified_parent_at.strftime('%Y-%m-%d %H:%M:%S.%3N')).to eq Time.now.strftime('%Y-%m-%d %H:%M:%S.%3N')