Skip to content

Commit

Permalink
change format of checking if job is enqueued
Browse files Browse the repository at this point in the history
  • Loading branch information
annvelents committed Sep 23, 2024
1 parent 5cc2f48 commit 2b1a850
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions spec/services/credit_notes/create_service_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -138,14 +138,10 @@
context 'when customer has tax_provider set up' do
let(:customer) { create(:customer, :with_tax_integration, organization:) }

before do
allow(CreditNotes::ProviderTaxes::ReportJob).to receive(:perform_later)
end

it 'enqueues a tax sync job' do
create_service.call

expect(CreditNotes::ProviderTaxes::ReportJob).to have_received(:perform_later).once
it 'sync with tax provider' do
expect do
create_service.call
end.to have_enqueued_job(CreditNotes::ProviderTaxes::ReportJob)
end
end

Expand Down

0 comments on commit 2b1a850

Please sign in to comment.