Fix test
This commit is contained in:
parent
097e7ac5d1
commit
f9ccc88657
2 changed files with 18 additions and 1 deletions
|
@ -3,7 +3,7 @@
|
|||
class ProcessReferencesWorker
|
||||
include Sidekiq::Worker
|
||||
|
||||
def perform(status_id, ids, urls, no_fetch_urls)
|
||||
def perform(status_id, ids, urls, no_fetch_urls = nil)
|
||||
ProcessReferencesService.new.call(Status.find(status_id), ids || [], urls: urls || [], no_fetch_urls: no_fetch_urls)
|
||||
rescue ActiveRecord::RecordNotFound
|
||||
true
|
||||
|
|
17
spec/workers/process_references_worker_spec.rb
Normal file
17
spec/workers/process_references_worker_spec.rb
Normal file
|
@ -0,0 +1,17 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
describe ProcessReferencesWorker do
|
||||
let(:worker) { described_class.new }
|
||||
|
||||
describe 'perform' do
|
||||
it 'runs without error for simple call' do
|
||||
expect { worker.perform(1000, [], []) }.to_not raise_error
|
||||
end
|
||||
|
||||
it 'runs without error with no_fetch_urls' do
|
||||
expect { worker.perform(1000, [], [], no_fetch_urls: []) }.to_not raise_error
|
||||
end
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue