Skip to content

Commit

Permalink
add missing spec
Browse files Browse the repository at this point in the history
  • Loading branch information
lovrocolic committed Aug 28, 2024
1 parent 2b04003 commit 47dda19
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions spec/jobs/bill_subscription_job_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,18 @@
expect(Invoices::SubscriptionService).to have_received(:call)
end

context 'when there is tax error' do
let(:result) do
BaseService::Result.new.validation_failure!(errors: {tax_error: ['invalidMapping']})
end

it 'does not throw an error' do
expect do
described_class.perform_now(subscriptions, timestamp, invoicing_reason:)
end.not_to raise_error
end
end

context 'with a previously created invoice' do
let(:invoice) { create(:invoice, :generating) }

Expand Down

0 comments on commit 47dda19

Please sign in to comment.