|
|
|
@ -31,6 +31,7 @@ RSpec.describe CsvDownloadMailer do |
|
|
|
describe "#send_missing_lettings_addresses_csv_download_mail" do |
|
|
|
describe "#send_missing_lettings_addresses_csv_download_mail" do |
|
|
|
it "sends a CSV download E-mail via notify" do |
|
|
|
it "sends a CSV download E-mail via notify" do |
|
|
|
link = :link |
|
|
|
link = :link |
|
|
|
|
|
|
|
duration = 20.minutes.to_i |
|
|
|
|
|
|
|
|
|
|
|
expect(notify_client).to receive(:send_email).with( |
|
|
|
expect(notify_client).to receive(:send_email).with( |
|
|
|
email_address: user.email, |
|
|
|
email_address: user.email, |
|
|
|
@ -38,16 +39,18 @@ RSpec.describe CsvDownloadMailer do |
|
|
|
personalisation: { |
|
|
|
personalisation: { |
|
|
|
name: user.name, |
|
|
|
name: user.name, |
|
|
|
link:, |
|
|
|
link:, |
|
|
|
|
|
|
|
duration: "20 minutes", |
|
|
|
}, |
|
|
|
}, |
|
|
|
) |
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
described_class.new.send_missing_lettings_addresses_csv_download_mail(user, link) |
|
|
|
described_class.new.send_missing_lettings_addresses_csv_download_mail(user, link, duration) |
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
describe "#send_missing_sales_addresses_csv_download_mail" do |
|
|
|
describe "#send_missing_sales_addresses_csv_download_mail" do |
|
|
|
it "sends a CSV download E-mail via notify" do |
|
|
|
it "sends a CSV download E-mail via notify" do |
|
|
|
link = :link |
|
|
|
link = :link |
|
|
|
|
|
|
|
duration = 20.minutes.to_i |
|
|
|
|
|
|
|
|
|
|
|
expect(notify_client).to receive(:send_email).with( |
|
|
|
expect(notify_client).to receive(:send_email).with( |
|
|
|
email_address: user.email, |
|
|
|
email_address: user.email, |
|
|
|
@ -55,10 +58,11 @@ RSpec.describe CsvDownloadMailer do |
|
|
|
personalisation: { |
|
|
|
personalisation: { |
|
|
|
name: user.name, |
|
|
|
name: user.name, |
|
|
|
link:, |
|
|
|
link:, |
|
|
|
|
|
|
|
duration: "20 minutes", |
|
|
|
}, |
|
|
|
}, |
|
|
|
) |
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
described_class.new.send_missing_sales_addresses_csv_download_mail(user, link) |
|
|
|
described_class.new.send_missing_sales_addresses_csv_download_mail(user, link, duration) |
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|
|