aboutsummaryrefslogtreecommitdiffstats
path: root/spec/models/import_spec.rb
diff options
context:
space:
mode:
authorTeddy Wing2017-08-28 18:40:11 +0200
committerTeddy Wing2017-08-28 18:43:01 +0200
commit4489051e192d151edee3d0820f3db93caceacc74 (patch)
treeae193447ffccac0ec1978eaa29f19a83196a2a7a /spec/models/import_spec.rb
parent1fe97b3bb1429916f7dde8e90dde49197135398b (diff)
downloadchouette-core-4489051e192d151edee3d0820f3db93caceacc74.tar.bz2
Import spec: Remove argument to `#child_change`
`Import#child_change` no longer takes an argument, so we need to remove if from the tests.
Diffstat (limited to 'spec/models/import_spec.rb')
-rw-r--r--spec/models/import_spec.rb16
1 files changed, 8 insertions, 8 deletions
diff --git a/spec/models/import_spec.rb b/spec/models/import_spec.rb
index 3300392b7..b5424c756 100644
--- a/spec/models/import_spec.rb
+++ b/spec/models/import_spec.rb
@@ -30,7 +30,7 @@ RSpec.describe Import, :type => :model do
it "must call #child_change on its parent" do
allow(netex_import).to receive(:update)
- expect(workbench_import).to receive(:child_change).with(netex_import)
+ expect(workbench_import).to receive(:child_change)
netex_import.notify_parent
end
@@ -55,7 +55,7 @@ RSpec.describe Import, :type => :model do
it "updates :status to failed when child status indicates failure" do
allow(workbench_import).to receive(:update)
- netex_import = build_stubbed(
+ build_stubbed(
:netex_import,
parent: workbench_import,
status: failure_status
@@ -63,7 +63,7 @@ RSpec.describe Import, :type => :model do
expect(workbench_import).to receive(:update).with(status: 'failed')
- workbench_import.child_change(netex_import)
+ workbench_import.child_change
end
end
@@ -83,11 +83,11 @@ RSpec.describe Import, :type => :model do
it "updates :status to successful when #ready?" do
expect(workbench_import).to receive(:update).with(status: 'successful')
- workbench_import.child_change(netex_import)
+ workbench_import.child_change
end
it "updates :status to failed when #ready? and child is failed" do
- netex_import = build_stubbed(
+ build_stubbed(
:netex_import,
parent: workbench_import,
status: :failed
@@ -95,7 +95,7 @@ RSpec.describe Import, :type => :model do
expect(workbench_import).to receive(:update).with(status: 'failed')
- workbench_import.child_change(netex_import)
+ workbench_import.child_change
end
shared_examples(
@@ -108,11 +108,11 @@ RSpec.describe Import, :type => :model do
current_step: 2,
status: finished_status
)
- child = double('Import')
+ double('Import')
expect(workbench_import).not_to receive(:update)
- workbench_import.child_change(child)
+ workbench_import.child_change
end
end