Answers for "testings jobs with rspec"

1

testings jobs with rspec

require "rails_helper"

RSpec.describe UploadBackupsJob, :type => :job do
  describe "#perform_later" do
    it "uploads a backup" do
      ActiveJob::Base.queue_adapter = :test
      expect {
        UploadBackupsJob.perform_later('backup')
      }.to have_enqueued_job
    end
  end
end
Posted by: Guest on December-14-2020

Browse Popular Code Answers by Language