enqueues_user_ticket_counter_job_examples.rb 413 B

123456789101112
  1. # Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/
  2. RSpec.shared_examples 'TicketEnqueuesTicketUserTicketCounterJob', type: :job do
  3. subject { create(described_class.name.underscore) }
  4. let(:customer) { create(:customer) }
  5. it 'enqueues a job for the customer' do
  6. subject.customer = customer
  7. expect { subject.save }.to have_enqueued_job(TicketUserTicketCounterJob)
  8. end
  9. end