diff --git a/app/jobs/email_csv_job.rb b/app/jobs/email_csv_job.rb index 4bc7cc3c3..4cfe2af45 100644 --- a/app/jobs/email_csv_job.rb +++ b/app/jobs/email_csv_job.rb @@ -16,6 +16,6 @@ class EmailCsvJob < ApplicationJob url = storage_service.get_presigned_url(filename, EXPIRATION_TIME) - CsvDownloadMailer.new.send_email(user, url, EXPIRATION_TIME) + CsvDownloadMailer.new.send_csv_download_mail(user, url, EXPIRATION_TIME) end end diff --git a/spec/jobs/email_csv_job_spec.rb b/spec/jobs/email_csv_job_spec.rb index ae3e14b90..b5661baf0 100644 --- a/spec/jobs/email_csv_job_spec.rb +++ b/spec/jobs/email_csv_job_spec.rb @@ -35,7 +35,7 @@ describe EmailCsvJob do allow(storage_service).to receive(:get_presigned_url).and_return(test_url) allow(CsvDownloadMailer).to receive(:new).and_return(mailer) - allow(mailer).to receive(:send_email) + allow(mailer).to receive(:send_csv_download_mail) end it "uses an appropriate filename in S3" do @@ -49,7 +49,7 @@ describe EmailCsvJob do end it "sends an E-mail with the presigned URL and duration" do - expect(mailer).to receive(:send_email).with(user, test_url, instance_of(Integer)) + expect(mailer).to receive(:send_csv_download_mail).with(user, test_url, instance_of(Integer)) job.perform(user) end