dawarich/spec/jobs/enqueue_background_job_spec.rb

15 lines
376 B
Ruby
Raw Normal View History

2024-07-12 15:59:03 -04:00
# frozen_string_literal: true
require 'rails_helper'
RSpec.describe EnqueueBackgroundJob, type: :job do
2024-07-12 15:59:03 -04:00
let(:job_name) { 'start_reverse_geocoding' }
let(:user_id) { 1 }
it 'calls job creation service' do
expect(Jobs::Create).to receive(:new).with(job_name, user_id).and_return(double(call: nil))
EnqueueBackgroundJob.perform_now(job_name, user_id)
2024-07-12 15:59:03 -04:00
end
end