Updated

spec/jobs/archived / email_threshold_response_job_spec.rb

C
16 lines of codes
0 methods
N/A complexity/method
18 churn
11.9 complexity
55 duplications
require 'rails_helper' require_relative '../shared_examples' RSpec.describe Archived::EmailThresholdResponseJob, type: :job do
  1. Similar code found in 3 nodes Locations: 0 1 2
let(:email_requested_at) { Time.current } let(:petition) { FactoryBot.create(:archived_petition, :response) } let(:signature) { FactoryBot.create(:archived_signature, petition: petition) } let(:arguments) { { petition: petition } } before do petition.set_email_requested_at_for('government_response', to: email_requested_at) allow(petition).to receive_message_chain(:signatures_to_email_for, :find_each).and_yield(signature) end it_behaves_like "job to enqueue signatory mailing jobs" end