- Mailer: apply_defaults/1 sets From and Reply-To headers - AboutLive: content rendering, empty stats, and contact count display - Fix has_many :beacons association (wrong module path) - Fix router pipeline order: serve_markdown before accepts, after secure headers so markdown responses get security headers - Fix notify_listener_test Process.sleep regression - Update findings.md test coverage gap status
27 lines
655 B
Elixir
27 lines
655 B
Elixir
defmodule Microwaveprop.MailerTest do
|
|
use Microwaveprop.DataCase, async: true
|
|
|
|
import Swoosh.Email
|
|
|
|
alias Microwaveprop.Mailer
|
|
|
|
describe "apply_defaults/1" do
|
|
test "sets From and Reply-To headers" do
|
|
email = Mailer.apply_defaults(new())
|
|
|
|
assert email.from == {"NTMS Propagation", "prop@w5isp.com"}
|
|
assert email.reply_to == {"", "graham@mcintire.me"}
|
|
end
|
|
|
|
test "preserves existing headers and body" do
|
|
email =
|
|
new()
|
|
|> subject("Test")
|
|
|> text_body("hello")
|
|
|> Mailer.apply_defaults()
|
|
|
|
assert email.text_body == "hello"
|
|
assert email.subject == "Test"
|
|
end
|
|
end
|
|
end
|