enqueues_user_ticket_counter_job_examples.rb 337 B

12345678910
  1. RSpec.shared_examples 'TicketEnqueuesTicketUserTicketCounterJob', type: :job do
  2. subject { create(described_class.name.underscore) }
  3. let(:customer) { create('customer') }
  4. it 'enqueues a job for the customer' do
  5. subject.customer = customer
  6. expect { subject.save }.to have_enqueued_job(TicketUserTicketCounterJob)
  7. end
  8. end