Maintenance: Speed up Zendesk import spec by mocking retry cycle sleep.
This commit is contained in:
parent
b50326fb20
commit
4393064893
1 changed files with 5 additions and 1 deletions
|
@ -62,7 +62,11 @@ RSpec.shared_examples 'Sequencer::Unit::Import::Zendesk::SubSequence::Base' do
|
||||||
before { allow(response_obj).to receive(:status).and_return(403) }
|
before { allow(response_obj).to receive(:status).and_return(403) }
|
||||||
|
|
||||||
it 'does not rescue the resulting exception' do
|
it 'does not rescue the resulting exception' do
|
||||||
expect { process(params) }.to raise_error(api_error)
|
expect do
|
||||||
|
process(params) do |unit|
|
||||||
|
allow(unit).to receive(:sleep) # stub out this method to speed up retry cycle
|
||||||
|
end
|
||||||
|
end.to raise_error(api_error)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue