require 'rails_helper'
require_relative 'shared_examples'
RSpec.describe EmailThresholdResponseJob, type: :job do -
let(:email_requested_at) { Time.current }
let(:petition) { FactoryBot.create(:open_petition) }
let(:signature) { FactoryBot.create(:validated_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