Created
July 30, 2020 16:30
-
-
Save cored/e122f21d39a2d9d7f5c93d8662c2e701 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'sidekiq/testing' | |
RSpec.describe Billing::Workers::SynchronizeCanadaInvoicesMonthlyWorker do | |
subject(:synchronize_invoices_worker) { described_class } | |
before do | |
Sidekiq::Testing.inline! | |
allow(Invoices::Synchronize).to receive(:call) | |
end | |
describe '.perform' do | |
context 'when current Month' do | |
it 'synchronize invoices' do | |
Timecop.freeze '2020-07-1' do | |
synchronize_invoices_worker.perform_async | |
expect( | |
Invoices::Synchronize | |
).to have_received(:call).with(2020, 7) | |
end | |
end | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment