From 23793ca8865501fcb0672ce7e62d1e0b6417d0bd Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Tue, 5 Sep 2017 14:41:13 +0200 Subject: 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. --- spec/workers/workbench_import_worker_spec.rb | 1 + 1 file changed, 1 insertion(+) 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 -- cgit v1.2.3