aboutsummaryrefslogtreecommitdiffstats
path: root/spec/workers
diff options
context:
space:
mode:
authorTeddy Wing2017-09-05 14:41:13 +0200
committerTeddy Wing2017-09-05 14:41:13 +0200
commit23793ca8865501fcb0672ce7e62d1e0b6417d0bd (patch)
treecede57a09a9346c3ab201e66a7fcd7825c8ee799 /spec/workers
parent1485d68a3bef38fa3ed61cf610855861cea405b7 (diff)
downloadchouette-core-23793ca8865501fcb0672ce7e62d1e0b6417d0bd.tar.bz2
WorkbenchImportWorker spec: Check `ended_at` update after import
The import job now updates its `ended_at` time at the end of the import job. The mock didn't know this, though, so it gave us an error at that call. Add a new expectation for the update of the `ended_at` time to get this test to pass again.
Diffstat (limited to 'spec/workers')
-rw-r--r--spec/workers/workbench_import_worker_spec.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/spec/workers/workbench_import_worker_spec.rb b/spec/workers/workbench_import_worker_spec.rb
index 79b9443e0..a349b3433 100644
--- a/spec/workers/workbench_import_worker_spec.rb
+++ b/spec/workers/workbench_import_worker_spec.rb
@@ -72,6 +72,7 @@ RSpec.describe WorkbenchImportWorker, type: [:worker, :request] do
expect( import ).to receive(:update).with(total_steps: 2)
expect( import ).to receive(:update).with(current_step: 1)
expect( import ).to receive(:update).with(current_step: 2)
+ expect( import ).to receive(:update).with(ended_at: Time.now)
worker.perform import.id