mirror of
https://github.com/danbee/chess
synced 2025-03-04 08:39:06 +00:00
Adjust email and test for subject
This commit is contained in:
parent
2bf71e882f
commit
95b565231a
@ -6,12 +6,12 @@ defmodule Chess.Emails do
|
||||
def new_game_email(conn, game) do
|
||||
new_email()
|
||||
|> to(game.opponent)
|
||||
|> from("games@64squares.club")
|
||||
|> subject("New chess game created!")
|
||||
|> from({"64squares", "games@64squares.club"})
|
||||
|> subject(
|
||||
"[64squares] #{game.user.name} has invited you to play a game of chess."
|
||||
)
|
||||
|> text_body("""
|
||||
#{game.user.name} has invited you to play a game of chess.
|
||||
|
||||
#{ChessWeb.Router.Helpers.game_url(conn, :show, game)}
|
||||
Game link: #{ChessWeb.Router.Helpers.game_url(conn, :show, game)}
|
||||
""")
|
||||
end
|
||||
end
|
||||
|
||||
@ -45,7 +45,8 @@ defmodule ChessWeb.GameControllerTest do
|
||||
|> post(game_path(conn, :create), game: attrs)
|
||||
|
||||
assert_email_delivered_with(
|
||||
to: [{opponent.name, opponent.email}]
|
||||
to: [{opponent.name, opponent.email}],
|
||||
subject: "[64squares] #{user.name} has invited you to play a game of chess."
|
||||
)
|
||||
end
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user