Fix crash on successful import email

This commit is contained in:
Stanko K.R.
2026-02-02 14:47:58 +01:00
parent 6e6e4e9b5a
commit 96a1d7d2d3
3 changed files with 17 additions and 2 deletions
@@ -1,5 +1,5 @@
<p class="subtitle">Your import of <%= @account.name %> is complete!</p>
<p><%= link_to "Go to your account", landing_url(script_name: account.slug) %></p>
<p><%= link_to "Go to your account", landing_url(script_name: @account.slug) %></p>
<p class="footer">Need help? <%= mail_to "support@fizzy.do", "Send us an email" %>.</p>
@@ -1,3 +1,3 @@
Your import of <%= @account.name %> is complete!
Here's the URL: <%= landing_url(script_name: account.slug) %>
Here's the URL: <%= landing_url(script_name: @account.slug) %>
+15
View File
@@ -0,0 +1,15 @@
require "test_helper"
class ImportMailerTest < ActionMailer::TestCase
test "completed" do
email = ImportMailer.completed(identities(:david), accounts(:"37s"))
assert_emails 1 do
email.deliver_now
end
assert_equal [ "david@37signals.com" ], email.to
assert_equal "Your Fizzy account import is done", email.subject
assert_match accounts(:"37s").slug, email.body.encoded
end
end