Skip to content

Commit 30b0c8b

Browse files
cbeermejackreed
authored andcommitted
Add some tests
1 parent b20f4d2 commit 30b0c8b

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

spec/models/spotlight/background_job_progress_spec.rb

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,19 @@
4444
end
4545

4646
context 'with an in-progress job' do
47+
let(:job_tracker_args) { { status: 'in_progress', data: { progress: 32, total: 50 } } }
48+
49+
it 'reports on reindexing progress' do
50+
expect(progress.as_json).to include(
51+
completed: 32,
52+
total: 50,
53+
finished: false,
54+
errored: false
55+
)
56+
end
57+
end
58+
59+
context 'with an in-progress job with subtasks' do
4760
before do
4861
FactoryBot.create(:job_tracker, on: job_tracker, resource: exhibit, data: { progress: 32, total: 32 }, status: 'completed')
4962
FactoryBot.create(:job_tracker, on: job_tracker, resource: exhibit, data: { progress: 16, total: 50 }, status: 'in_progress')

0 commit comments

Comments
 (0)