mirror of
https://github.com/mastodon/mastodon.git
synced 2024-11-20 03:25:17 +01:00
Pull out row_worker_job_args
in bulk import service spec
This commit is contained in:
parent
0823e389dd
commit
dc41531c09
@ -34,7 +34,7 @@ RSpec.describe BulkImportService do
|
||||
|
||||
it 'enqueues workers for the expected rows' do
|
||||
subject.call(import)
|
||||
expect(Import::RowWorker.jobs.pluck('args').flatten).to match_array(rows.map(&:id))
|
||||
expect(row_worker_job_args).to match_array(rows.map(&:id))
|
||||
end
|
||||
|
||||
it 'requests to follow all the listed users once the workers have run' do
|
||||
@ -79,7 +79,7 @@ RSpec.describe BulkImportService do
|
||||
|
||||
it 'enqueues workers for the expected rows' do
|
||||
subject.call(import)
|
||||
expect(Import::RowWorker.jobs.pluck('args').flatten).to match_array(rows[1..].map(&:id))
|
||||
expect(row_worker_job_args).to match_array(rows[1..].map(&:id))
|
||||
end
|
||||
|
||||
it 'requests to follow all the expected users once the workers have run' do
|
||||
@ -114,7 +114,7 @@ RSpec.describe BulkImportService do
|
||||
|
||||
it 'enqueues workers for the expected rows' do
|
||||
subject.call(import)
|
||||
expect(Import::RowWorker.jobs.pluck('args').flatten).to match_array(rows.map(&:id))
|
||||
expect(row_worker_job_args).to match_array(rows.map(&:id))
|
||||
end
|
||||
|
||||
it 'blocks all the listed users once the workers have run' do
|
||||
@ -155,7 +155,7 @@ RSpec.describe BulkImportService do
|
||||
|
||||
it 'enqueues workers for the expected rows' do
|
||||
subject.call(import)
|
||||
expect(Import::RowWorker.jobs.pluck('args').flatten).to match_array(rows[1..].map(&:id))
|
||||
expect(row_worker_job_args).to match_array(rows[1..].map(&:id))
|
||||
end
|
||||
|
||||
it 'requests to follow all the expected users once the workers have run' do
|
||||
@ -190,7 +190,7 @@ RSpec.describe BulkImportService do
|
||||
|
||||
it 'enqueues workers for the expected rows' do
|
||||
subject.call(import)
|
||||
expect(Import::RowWorker.jobs.pluck('args').flatten).to match_array(rows.map(&:id))
|
||||
expect(row_worker_job_args).to match_array(rows.map(&:id))
|
||||
end
|
||||
|
||||
it 'mutes all the listed users once the workers have run' do
|
||||
@ -235,7 +235,7 @@ RSpec.describe BulkImportService do
|
||||
|
||||
it 'enqueues workers for the expected rows' do
|
||||
subject.call(import)
|
||||
expect(Import::RowWorker.jobs.pluck('args').flatten).to match_array(rows[1..].map(&:id))
|
||||
expect(row_worker_job_args).to match_array(rows[1..].map(&:id))
|
||||
end
|
||||
|
||||
it 'requests to follow all the expected users once the workers have run' do
|
||||
@ -331,7 +331,7 @@ RSpec.describe BulkImportService do
|
||||
|
||||
it 'enqueues workers for the expected rows' do
|
||||
subject.call(import)
|
||||
expect(Import::RowWorker.jobs.pluck('args').flatten).to match_array(rows.map(&:id))
|
||||
expect(row_worker_job_args).to match_array(rows.map(&:id))
|
||||
end
|
||||
|
||||
it 'updates the bookmarks as expected once the workers have run' do
|
||||
@ -371,7 +371,7 @@ RSpec.describe BulkImportService do
|
||||
|
||||
it 'enqueues workers for the expected rows' do
|
||||
subject.call(import)
|
||||
expect(Import::RowWorker.jobs.pluck('args').flatten).to match_array(rows.map(&:id))
|
||||
expect(row_worker_job_args).to match_array(rows.map(&:id))
|
||||
end
|
||||
|
||||
it 'updates the bookmarks as expected once the workers have run' do
|
||||
@ -385,6 +385,13 @@ RSpec.describe BulkImportService do
|
||||
end
|
||||
end
|
||||
|
||||
def row_worker_job_args
|
||||
Import::RowWorker
|
||||
.jobs
|
||||
.pluck('args')
|
||||
.flatten
|
||||
end
|
||||
|
||||
def stub_resolve_account_service
|
||||
resolve_account_service_double = instance_double(ResolveAccountService)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user