diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 750dde489fb..60cb47c954d 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -969,6 +969,7 @@ lib/vetext @department-of-veterans-affairs/mobile-api-team lib/vic @department-of-veterans-affairs/octo-identity lib/virtual_regional_office @department-of-veterans-affairs/Benefits-Team-1 @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group lib/vre @department-of-veterans-affairs/benefits-non-disability @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group +lib/res @department-of-veterans-affairs/benefits-non-disability @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group lib/webhooks @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group modules/accredited_representatives @department-of-veterans-affairs/accredited-representation-management modules/appeals_api @department-of-veterans-affairs/lighthouse-banana-peels @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group @@ -1437,6 +1438,7 @@ spec/lib/vbs @department-of-veterans-affairs/vsa-debt-resolution @department-of- spec/lib/vetext @department-of-veterans-affairs/mobile-api-team spec/lib/virtual_regional_office @department-of-veterans-affairs/Benefits-Team-1 @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group spec/lib/vre/ch31_form_spec.rb @department-of-veterans-affairs/benefits-non-disability @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group +spec/lib/res/ch31_form_spec.rb @department-of-veterans-affairs/benefits-non-disability @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group spec/lib/webhooks/utilities_spec.rb @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group spec/mailers/ch31_submissions_report_mailer_spec.rb @department-of-veterans-affairs/benefits-non-disability @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group spec/mailers/create_daily_spool_files_mailer_spec.rb @department-of-veterans-affairs/my-education-benefits @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group diff --git a/app/models/saved_claim/veteran_readiness_employment_claim.rb b/app/models/saved_claim/veteran_readiness_employment_claim.rb index 062b1dd113c..2ccb3a13771 100644 --- a/app/models/saved_claim/veteran_readiness_employment_claim.rb +++ b/app/models/saved_claim/veteran_readiness_employment_claim.rb @@ -1,6 +1,7 @@ # frozen_string_literal: true require 'sentry_logging' +require 'res/ch31_form' require 'vre/ch31_form' class SavedClaim::VeteranReadinessEmploymentClaim < SavedClaim @@ -74,7 +75,7 @@ class SavedClaim::VeteranReadinessEmploymentClaim < SavedClaim }.freeze def initialize(args) - @sent_to_cmp = false + @sent_to_lighthouse = false super end @@ -107,34 +108,31 @@ def add_office_location(updated_form) @office_location = regional_office[0] office_name = regional_office[1] - updated_form['veteranInformation']&.merge!({ 'regionalOffice' => "#{@office_location} - #{office_name}" }) + updated_form['veteranInformation']&.merge!({ + 'regionalOffice' => "#{@office_location} - #{office_name}", + 'regionalOfficeName' => office_name, + 'stationId' => @office_location + }) end def send_to_vre(user) + add_claimant_info(user) + if user&.participant_id - begin - upload_to_vbms - send_vbms_confirmation_email(user) - rescue - log_message_to_sentry('Error uploading VRE claim to VBMS. Now attempting to upload claim to central mail...', - :warn, { uuid: user.uuid }) - begin - send_to_central_mail!(user) - rescue => e - log_message_to_sentry('Error uploading VRE claim to central mail after failure uploading claim to vbms', - :error, { uuid: user.uuid }) - log_exception_to_sentry(e, { uuid: user.uuid }) - end - end + upload_to_vbms(user:) else - log_message_to_sentry('Participant id is blank when submitting VRE claim', :warn) - send_to_central_mail!(user) + Rails.logger.warn('Participant id is blank when submitting VRE claim') + send_to_lighthouse!(user) end - send_vre_email_form(user) + if Flipper.enabled?(:veteran_readiness_employment_to_res) + send_to_res(user) + else + send_vre_email_form(user) + end end - def upload_to_vbms(doc_type: '1167') + def upload_to_vbms(user:, doc_type: '1167') form_path = PdfFill::Filler.fill_form(self, nil, { created_at: }) uploader = ClaimsApi::VBMSUploader.new( @@ -144,15 +142,26 @@ def upload_to_vbms(doc_type: '1167') ) log_to_statsd('vbms') do - uploader.upload! + response = uploader.upload! + + if response[:vbms_document_series_ref_id].present? + updated_form = parsed_form + updated_form['documentId'] = response[:vbms_document_series_ref_id] + update!(form: updated_form.to_json) + end end + + send_vbms_confirmation_email(user) + rescue + Rails.logger.error('Error uploading VRE claim to VBMS.', { user_uuid: user.uuid }) + send_to_lighthouse!(user) end def to_pdf(file_name = nil) PdfFill::Filler.fill_form(self, file_name, { created_at: }) end - def send_to_central_mail!(user) + def send_to_lighthouse!(user) form_copy = parsed_form.clone form_copy['veteranSocialSecurityNumber'] = parsed_form.dig('veteranInformation', 'ssn') @@ -160,27 +169,50 @@ def send_to_central_mail!(user) form_copy['vaFileNumber'] = parsed_form.dig('veteranInformation', 'VAFileNumber') update!(form: form_copy.to_json) - log_message_to_sentry(guid, :warn, { attachment_id: guid }, { team: 'vfs-ebenefits' }) - @sent_to_cmp = true - log_to_statsd('cmp') do - process_attachments! - end - send_central_mail_confirmation_email(user) + process_attachments! + @sent_to_lighthouse = true + + send_lighthouse_confirmation_email(user) + rescue => e + Rails.logger.error('Error uploading VRE claim to central mail.', { user_uuid: user.uuid, e: }) end - def send_vre_email_form(user) - @office_location = check_office_location[0] if @office_location.nil? + def send_to_res(user) + email_addr = REGIONAL_OFFICE_EMAILS[@office_location] || 'VRE.VBACO@va.gov' - log_message_to_sentry("VRE claim office location: #{@office_location}", - :info, { uuid: user.uuid }) + Rails.logger.info('VRE claim sending to RES service', + { + email: email_addr, + user_uuid: user.uuid, + was_sent: @sent_to_lighthouse, + user_present: user.present? + }) + + if user.present? + VeteranReadinessEmploymentMailer.build(user.participant_id, email_addr, + @sent_to_lighthouse).deliver_later + end - email_addr = REGIONAL_OFFICE_EMAILS[@office_location] || 'VRE.VBACO@va.gov' + service = RES::Ch31Form.new(user:, claim: self) + service.submit + end - log_message_to_sentry("VRE claim email: #{email_addr}, sent to cmp: #{@sent_to_cmp} #{user.present?}", - :info, { uuid: user.uuid }) + def send_vre_email_form(user) + email_addr = REGIONAL_OFFICE_EMAILS[@office_location] || 'VRE.VBACO@va.gov' - VeteranReadinessEmploymentMailer.build(user.participant_id, email_addr, @sent_to_cmp).deliver_later if user.present? + Rails.logger.info('VRE claim sending to VRE service', + { + email: email_addr, + user_uuid: user.uuid, + was_sent: @sent_to_lighthouse, + user_present: user.present? + }) + + if user.present? + VeteranReadinessEmploymentMailer.build(user.participant_id, email_addr, + @sent_to_lighthouse).deliver_later + end # During Roll out our partners ask that we check vet location and if within proximity to specific offices, # send the data to them. We always send a pdf to VBMS @@ -208,7 +240,7 @@ def send_vbms_confirmation_email(user) ) end - def send_central_mail_confirmation_email(user) + def send_lighthouse_confirmation_email(user) return if user.va_profile_email.blank? VANotify::EmailJob.perform_async( @@ -248,7 +280,7 @@ def check_office_location regional_office_response[:regional_office][:name] ] rescue => e - log_message_to_sentry(e.message, :warn, {}, { team: 'vfs-ebenefits' }) + Rails.logger.warn(e.message) ['000', 'Not Found'] end diff --git a/app/sidekiq/vre/submit1900_job.rb b/app/sidekiq/vre/submit1900_job.rb index d9b6135f55e..2ed1e1ad4de 100644 --- a/app/sidekiq/vre/submit1900_job.rb +++ b/app/sidekiq/vre/submit1900_job.rb @@ -20,10 +20,10 @@ class Submit1900Job def perform(claim_id, user_uuid) claim = SavedClaim::VeteranReadinessEmploymentClaim.find claim_id user = User.find user_uuid - claim.add_claimant_info(user) claim.send_to_vre(user) - rescue - Rails.logger.warn('VRE::Submit1900Job failed, retrying...') + rescue => e + Rails.logger.warn("VRE::Submit1900Job failed, retrying...: #{e.message}") + raise end end end diff --git a/config/features.yml b/config/features.yml index ed238d8ab08..7f56e0f2fe3 100644 --- a/config/features.yml +++ b/config/features.yml @@ -1495,3 +1495,7 @@ features: toggle_vye_adress_direct_deposit_forms: actor_type: user description: Enable mailing address and direct deposit for VYE + veteran_readiness_employment_to_res: + actor_type: user + description: Enable RES platform for Veteran Readiness & Employment form submissions, disabled will use VRE email + enable_in_development: true diff --git a/config/settings.yml b/config/settings.yml index 4ba0b129553..560a475068d 100644 --- a/config/settings.yml +++ b/config/settings.yml @@ -1370,6 +1370,10 @@ vetext_push: user: vets-api-username pass: secret +res: + base_url: ~ + api_key: ~ + veteran_readiness_and_employment: base_url: ~ credentials: ~ diff --git a/config/settings/test.yml b/config/settings/test.yml index 76107627402..b7295c7751f 100644 --- a/config/settings/test.yml +++ b/config/settings/test.yml @@ -149,6 +149,10 @@ vanotify: claim_submission_timeout_text: oh_fake_timeout_template_id claim_submission_error_text: oh_fake_error_template_id +res: + base_url: https://fake_url.com + api_key: fake_auth + veteran_readiness_and_employment: base_url: https://fake_url.com credentials: fake_auth diff --git a/lib/res/ch31_form.rb b/lib/res/ch31_form.rb new file mode 100644 index 00000000000..1a44dadc47c --- /dev/null +++ b/lib/res/ch31_form.rb @@ -0,0 +1,135 @@ +# frozen_string_literal: true + +require_relative 'service' +require_relative 'errors/ch31_errors' +require 'sentry_logging' + +module RES + class Ch31Form < RES::Service + include SentryLogging + configuration RES::Configuration + STATSD_KEY_PREFIX = 'api.res' + + def initialize(user:, claim:) + super() + @user = user + @claim = claim + end + + # Submits prepared data derived from VeteranReadinessEmploymentClaim#form + # + # @return [Hash] the student's address + # + def submit + if @claim.nil? + Rails.logger.error('Ch31NilClaimError. user icn:', @user.icn) + raise Ch31NilClaimError + end + + response = send_to_res(payload: format_payload_for_res) + response_body = response.body + + raise Ch31Error if response_body['success_message'].blank? + + response_body + rescue Ch31Error => e + process_ch_31_error(e, response_body) + + raise + end + + private + + def format_payload_for_res + form_data = claim_form_hash + + res_payload = { + useEva: form_data['useEva'], + receiveElectronicCommunication: form_data['receiveElectronicCommunication'], + useTelecounseling: form_data['useTelecounseling'], + appointmentTimePreferences: form_data['appointmentTimePreferences'], + yearsOfEducation: form_data['yearsOfEducation'], + isMoving: form_data['isMoving'], + mainPhone: form_data['mainPhone'], + cellNumber: form_data['cellPhone'], + internationalNumber: form_data['internationalNumber'], + email: form_data['email'], + documentId: form_data['documentId'], + receivedDate: @claim.created_at.to_date.to_s, + veteranAddress: mapped_address_hash(form_data['veteranAddress']) + } + + res_payload.merge!({ veteranInformation: adjusted_veteran_information }) + res_payload.merge!(new_address) if form_data['newAddress'].present? + + res_payload.to_json + end + + # TODO: determine need + def veteran_address(form_data) + vet_address = mapped_address_hash(form_data['veteranAddress']) + + adjusted_address = { + veteranAddress: vet_address + } + + return adjusted_address if adjusted_address.dig(:veteranAddress, :isForeign) == false + + # RES/CMSA expects different keys for postal and state for foreign addresses + # internationPostalCode misspelling is correct + international_address = adjusted_address[:veteranAddress] + international_address[:internationPostalCode] = international_address.delete(:zipCode) + international_address[:province] = international_address.delete(:stateCode) + + adjusted_address + end + + def claim_form_hash + @claim.parsed_form + end + + def adjusted_veteran_information + vet_info = claim_form_hash['veteranInformation'] + + vet_info['VAFileNumber'] = vet_info.delete('vaFileNumber') if vet_info.key?('vaFileNumber') + vet_info['regionalOffice'] = vet_info['regionalOfficeName'] + vet_info.delete(:regionalOfficeName) + + vet_info + end + + def new_address + new_address = mapped_address_hash(claim_form_hash['newAddress']) + + adjusted_new_address = { + newAddress: new_address + } + + return adjusted_new_address unless new_address[:isForeign] + + # RES/CMSA expects different keys for postal and state for foreign addresses + new_address[:internationalPostalCode] = new_address.delete(:zipCode) + new_address[:province] = new_address.delete(:stateCode) + + adjusted_new_address + end + + def mapped_address_hash(client_hash) + { + country: client_hash['country'], + street: client_hash['street'], + city: client_hash['city'], + state: client_hash['state'], + postalCode: client_hash['postalCode'] + } + end + + def process_ch_31_error(e, response_body) + Rails.logger.error(e) + Rails.logger.error({ + intake_id: response_body['ApplicationIntake'], + error_message: response_body['ErrorMessage'] + }) + end + end +end diff --git a/lib/res/configuration.rb b/lib/res/configuration.rb new file mode 100644 index 00000000000..ee4932d2ae1 --- /dev/null +++ b/lib/res/configuration.rb @@ -0,0 +1,30 @@ +# frozen_string_literal: true + +require 'common/client/configuration/rest' + +module RES + class Configuration < Common::Client::Configuration::REST + def connection + @conn ||= Faraday.new(base_path, headers: base_request_headers, request: request_options) do |faraday| + faraday.use :breakers + faraday.use Faraday::Response::RaiseError + faraday.response :betamocks if mock_enabled? + faraday.response :snakecase, symbolize: false + faraday.response :json, content_type: /\bjson/ + faraday.adapter Faraday.default_adapter + end + end + + def mock_enabled? + Settings.res.mock_ch_31 || false + end + + def base_path + Settings.res.base_url + end + + def service_name + 'ReadinessAndEmployementSystem' + end + end +end diff --git a/lib/res/errors/ch31_errors.rb b/lib/res/errors/ch31_errors.rb new file mode 100644 index 00000000000..d0bd7c792b0 --- /dev/null +++ b/lib/res/errors/ch31_errors.rb @@ -0,0 +1,4 @@ +# frozen_string_literal: true + +class Ch31Error < StandardError; end +class Ch31NilClaimError < StandardError; end diff --git a/lib/res/service.rb b/lib/res/service.rb new file mode 100644 index 00000000000..593a247c3b2 --- /dev/null +++ b/lib/res/service.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true + +require 'res/configuration' +require 'common/client/base' + +# The RES::Service class is where we keep RES related endpoint calls and common methods +module RES + class Service < Common::Client::Base + include Common::Client::Concerns::Monitoring + + def send_to_res(payload:) + with_monitoring do + perform( + :post, + end_point, + payload, + request_headers + ) # see lib/common/client/base.rb#L94 + end + end + + def request_headers + { + 'Appian-API-Key': Settings.res.api_key + } + end + + private + + def end_point + "#{Settings.res.base_url}/suite/webapi/form281900" + end + end +end diff --git a/spec/lib/res/ch31_form_spec.rb b/spec/lib/res/ch31_form_spec.rb new file mode 100644 index 00000000000..871f81e01a9 --- /dev/null +++ b/spec/lib/res/ch31_form_spec.rb @@ -0,0 +1,60 @@ +# frozen_string_literal: true + +require 'rails_helper' +require 'res/ch31_form' + +RSpec.describe RES::Ch31Form do + let(:claim) { create(:veteran_readiness_employment_claim) } + let(:user) { FactoryBot.create(:evss_user, :loa3) } + let(:service) { RES::Ch31Form.new(user:, claim:) } + let(:new_address_hash) do + { + newAddress: { + isForeign: false, + isMilitary: nil, + countryName: 'USA', + addressLine1: '1019 Robin Cir', + addressLine2: nil, + addressLine3: nil, + city: 'Arroyo Grande', + province: 'CA', + internationalPostalCode: '93420' + } + } + end + let(:success_message) { OpenStruct.new(body: { 'success_message' => 'RES has successfully received the request' }) } + + describe '#submit' do + let(:faraday_response) { double('faraday_connection') } + + before do + allow(faraday_response).to receive(:env) + end + + context 'with a successful submission' do + before do + allow(service).to receive(:send_to_res).and_return(success_message) + end + + it 'adds a new address if the user is moving within 30 days' do + expect(service).to receive(:new_address) { new_address_hash } + + service.submit + end + end + + context 'with an unsuccessful submission' do + it 'does not successfully send to RES' do + allow(service).to receive(:send_to_res).and_return(OpenStruct.new(body: { 'error' => 'Error' })) + + expect { service.submit }.to raise_error(Ch31Error) + end + + it 'handles nil claim' do + nil_claim_service = RES::Ch31Form.new(user:, claim: nil) + + expect { nil_claim_service.submit }.to raise_error(Ch31NilClaimError) + end + end + end +end diff --git a/spec/models/saved_claim/veteran_readiness_employment_claim_spec.rb b/spec/models/saved_claim/veteran_readiness_employment_claim_spec.rb index 1f362f42502..f821c315c7d 100644 --- a/spec/models/saved_claim/veteran_readiness_employment_claim_spec.rb +++ b/spec/models/saved_claim/veteran_readiness_employment_claim_spec.rb @@ -23,37 +23,36 @@ } end + before do + allow_any_instance_of(RES::Ch31Form).to receive(:submit).and_return(true) + Flipper.enable(:veteran_readiness_employment_to_res) + end + describe '#add_claimant_info' do it 'adds veteran information' do - VCR.use_cassette 'veteran_readiness_employment/add_claimant_info' do - claim.add_claimant_info(user_object) - claimant_keys = %w[fullName dob pid edipi vet360ID regionalOffice VAFileNumber ssn] - expect(claim.parsed_form['veteranInformation']).to include( - { - 'fullName' => { - 'first' => 'Homer', - 'middle' => 'John', - 'last' => 'Simpson' - }, - 'dob' => '1986-05-06' - } - ) - - expect( - claim.parsed_form['veteranInformation'].keys - ).to eq(claimant_keys) - end + claim.add_claimant_info(user_object) + claimant_keys = %w[fullName dob pid edipi vet360ID regionalOffice regionalOfficeName stationId VAFileNumber ssn] + expect(claim.parsed_form['veteranInformation']).to include( + { + 'fullName' => { + 'first' => 'Homer', + 'middle' => 'John', + 'last' => 'Simpson' + }, + 'dob' => '1986-05-06' + } + ) + + expect(claim.parsed_form['veteranInformation']).to include(*claimant_keys) end it 'does not obtain va_file_number' do - VCR.use_cassette 'veteran_readiness_employment/add_claimant_info' do - people_service_object = double('people_service') - allow(people_service_object).to receive(:find_person_by_participant_id) - allow(BGS::People::Request).to receive(:new) { people_service_object } + people_service_object = double('people_service') + allow(people_service_object).to receive(:find_person_by_participant_id) + allow(BGS::People::Request).to receive(:new) { people_service_object } - claim.add_claimant_info(user_object) - expect(claim.parsed_form['veteranInformation']).to include('VAFileNumber' => nil) - end + claim.add_claimant_info(user_object) + expect(claim.parsed_form['veteranInformation']).to include('VAFileNumber' => nil) end end @@ -67,23 +66,19 @@ allow(VBMS::Client).to receive(:from_env_vars).and_return(@vbms_client) end - it 'calls #send_to_central_mail!' do - VCR.use_cassette('vbms/document_upload_417') do - expect(claim).to receive(:send_to_central_mail!) - subject - end + it 'calls #send_to_lighthouse!' do + expect(claim).to receive(:send_to_lighthouse!) + subject end it 'does not raise an error' do - VCR.use_cassette('vbms/document_upload_417') do - allow(claim).to receive(:send_to_central_mail!) - expect { subject }.not_to raise_error - end + allow(claim).to receive(:send_to_lighthouse!) + expect { subject }.not_to raise_error end end context 'when VBMS upload is successful' do - before { expect(ClaimsApi::VBMSUploader).to receive(:new) { OpenStruct.new(upload!: true) } } + before { expect(ClaimsApi::VBMSUploader).to receive(:new) { OpenStruct.new(upload!: {}) } } context 'submission to VRE' do before do @@ -96,47 +91,30 @@ ) end - it 'successfully sends to VRE' do - VCR.use_cassette 'veteran_readiness_employment/send_to_vre' do - claim.add_claimant_info(user_object) - response = claim.send_to_vre(user_object) + it 'sends confirmation email' do + expect(claim).to receive(:send_vbms_confirmation_email).with(user_object) - # the business has asked us to put a pause on submissions - # so this is just a temporary change but will be put back - # expect(response['error_occurred']).to eq(false) - expect(response).to eq(nil) - end + claim.send_to_vre(user_object) end + end - it 'does not successfully send to VRE' do - VCR.use_cassette 'veteran_readiness_employment/failed_send_to_vre' do + # We want all submission to go through with RES + context 'non-submission to VRE' do + context 'flipper enabled' do + it 'stops submission if location is not in list' do + expect_any_instance_of(RES::Ch31Form).to receive(:submit) claim.add_claimant_info(user_object) - response = claim.send_to_vre(user_object) - - # the business has asked us to put a pause on submissions - # so this is just a temporary change but will be put back - # expect(response['error_occurred']).to eq(true) - expect(response).to eq(nil) - end - end - it 'sends confirmation email' do - VCR.use_cassette 'veteran_readiness_employment/send_to_vre' do - expect(claim).to receive(:send_vbms_confirmation_email).with(user_object) - - claim.add_claimant_info(user_object) claim.send_to_vre(user_object) end end - end - context 'non-submission to VRE' do - it 'stops submission if location is not in list' do - VCR.use_cassette 'veteran_readiness_employment/send_to_vre' do - expect_any_instance_of(BGS::RORoutingService).to receive(:get_regional_office_by_zip_code).and_return( - { regional_office: { number: '310' } } - ) + context 'flipper disabled' do + before do + Flipper.disable(:veteran_readiness_employment_to_res) + end + it 'stops submission if location is not in list' do expect(VRE::Ch31Form).not_to receive(:new) claim.add_claimant_info(user_object) @@ -150,9 +128,9 @@ let(:user_object) { create(:unauthorized_evss_user) } it 'PDF is sent to Central Mail and not VBMS' do - expect(claim).to receive(:send_to_central_mail!).with(user_object).once.and_call_original expect(claim).to receive(:process_attachments!) - expect(claim).to receive(:send_central_mail_confirmation_email) + expect(claim).to receive(:send_to_lighthouse!).with(user_object).once.and_call_original + expect(claim).to receive(:send_lighthouse_confirmation_email) expect(claim).not_to receive(:upload_to_vbms) expect(VeteranReadinessEmploymentMailer).to receive(:build).with( user_object.participant_id, 'VRE.VBAPIT@va.gov', true @@ -185,8 +163,8 @@ end end - describe '#send_central_mail_confirmation_email' do - subject { claim.send_central_mail_confirmation_email(user_object) } + describe '#send_lighthouse_confirmation_email' do + subject { claim.send_lighthouse_confirmation_email(user_object) } it 'calls the VA notify email job' do expect(VANotify::EmailJob).to receive(:perform_async).with( diff --git a/spec/sidekiq/vre/submit1900_job_spec.rb b/spec/sidekiq/vre/submit1900_job_spec.rb index b47778a4507..de75d36101b 100644 --- a/spec/sidekiq/vre/submit1900_job_spec.rb +++ b/spec/sidekiq/vre/submit1900_job_spec.rb @@ -19,7 +19,8 @@ end it 'calls claim.add_claimant_info' do - allow(claim).to receive(:send_to_central_mail!) + allow(claim).to receive(:send_to_lighthouse!) + allow(claim).to receive(:send_to_res) expect(claim).to receive(:add_claimant_info).with(user) end