diff --git a/app/jobs/reports/identity_verification_report.rb b/app/jobs/reports/identity_verification_report.rb index ed516fd2fe8..2903770f8ca 100644 --- a/app/jobs/reports/identity_verification_report.rb +++ b/app/jobs/reports/identity_verification_report.rb @@ -7,6 +7,7 @@ class IdentityVerificationReport < BaseReport attr_accessor :report_date def perform(report_date) + return unless IdentityConfig.store.s3_reports_enabled self.report_date = report_date csv = report_maker.to_csv diff --git a/spec/jobs/reports/identity_verification_report_spec.rb b/spec/jobs/reports/identity_verification_report_spec.rb index dcba225eca1..56d35b79572 100644 --- a/spec/jobs/reports/identity_verification_report_spec.rb +++ b/spec/jobs/reports/identity_verification_report_spec.rb @@ -1,6 +1,10 @@ require 'rails_helper' RSpec.describe Reports::IdentityVerificationReport do + before do + allow(IdentityConfig.store).to receive(:s3_reports_enabled).and_return(true) + end + describe '#perform' do it 'gets a CSV from the report maker and saves it to S3' do report_maker = double(Reporting::IdentityVerificationReport, to_csv: 'I am a CSV, see')