Updated

spec/jobs / application_job_spec.rb

A
25 lines of codes
1 methods
24.2 complexity/method
2 churn
24.18 complexity
0 duplications
require 'rails_helper' RSpec.describe ApplicationJob, type: :job do class AnApplicationJob < ::ApplicationJob
  1. AnApplicationJob has no descriptive comment
def perform logger.info "Performed application job" end end it "reloads the site instance" do expect(Site).to receive(:reload).and_call_original perform_enqueued_jobs { AnApplicationJob.perform_later } end it "reloads the parliament instance" do expect(Parliament).to receive(:reload).and_call_original perform_enqueued_jobs { AnApplicationJob.perform_later } end end