fix: change email to vavakado.xyz
This commit is contained in:
parent
72abc0114f
commit
b5caa37646
5 changed files with 9 additions and 9 deletions
|
@ -8,7 +8,7 @@ defmodule Exmr.Users.UserNotifier do
|
||||||
email =
|
email =
|
||||||
new()
|
new()
|
||||||
|> to(recipient)
|
|> to(recipient)
|
||||||
|> from({"Exmr", "contact@example.com"})
|
|> from({"Exmr", "contact@vavakado.xyz"})
|
||||||
|> subject(subject)
|
|> subject(subject)
|
||||||
|> text_body(body)
|
|> text_body(body)
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,7 @@ defmodule Exmr.UsersTest do
|
||||||
|
|
||||||
describe "get_user_by_email/1" do
|
describe "get_user_by_email/1" do
|
||||||
test "does not return the user if the email does not exist" do
|
test "does not return the user if the email does not exist" do
|
||||||
refute Users.get_user_by_email("unknown@example.com")
|
refute Users.get_user_by_email("unknown@vavakado.xyz")
|
||||||
end
|
end
|
||||||
|
|
||||||
test "returns the user if the email exists" do
|
test "returns the user if the email exists" do
|
||||||
|
@ -19,7 +19,7 @@ defmodule Exmr.UsersTest do
|
||||||
|
|
||||||
describe "get_user_by_email_and_password/2" do
|
describe "get_user_by_email_and_password/2" do
|
||||||
test "does not return the user if the email does not exist" do
|
test "does not return the user if the email does not exist" do
|
||||||
refute Users.get_user_by_email_and_password("unknown@example.com", "hello world!")
|
refute Users.get_user_by_email_and_password("unknown@vavakado.xyz", "hello world!")
|
||||||
end
|
end
|
||||||
|
|
||||||
test "does not return the user if the password is not valid" do
|
test "does not return the user if the password is not valid" do
|
||||||
|
@ -182,14 +182,14 @@ defmodule Exmr.UsersTest do
|
||||||
test "sends token through notification", %{user: user} do
|
test "sends token through notification", %{user: user} do
|
||||||
token =
|
token =
|
||||||
extract_user_token(fn url ->
|
extract_user_token(fn url ->
|
||||||
Users.deliver_user_update_email_instructions(user, "current@example.com", url)
|
Users.deliver_user_update_email_instructions(user, "current@vavakado.xyz", url)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
{:ok, token} = Base.url_decode64(token, padding: false)
|
{:ok, token} = Base.url_decode64(token, padding: false)
|
||||||
assert user_token = Repo.get_by(UserToken, token: :crypto.hash(:sha256, token))
|
assert user_token = Repo.get_by(UserToken, token: :crypto.hash(:sha256, token))
|
||||||
assert user_token.user_id == user.id
|
assert user_token.user_id == user.id
|
||||||
assert user_token.sent_to == user.email
|
assert user_token.sent_to == user.email
|
||||||
assert user_token.context == "change:current@example.com"
|
assert user_token.context == "change:current@vavakado.xyz"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -223,7 +223,7 @@ defmodule Exmr.UsersTest do
|
||||||
end
|
end
|
||||||
|
|
||||||
test "does not update email if user email changed", %{user: user, token: token} do
|
test "does not update email if user email changed", %{user: user, token: token} do
|
||||||
assert Users.update_user_email(%{user | email: "current@example.com"}, token) == :error
|
assert Users.update_user_email(%{user | email: "current@vavakado.xyz"}, token) == :error
|
||||||
assert Repo.get!(User, user.id).email == user.email
|
assert Repo.get!(User, user.id).email == user.email
|
||||||
assert Repo.get_by(UserToken, user_id: user.id)
|
assert Repo.get_by(UserToken, user_id: user.id)
|
||||||
end
|
end
|
||||||
|
|
|
@ -54,7 +54,7 @@ defmodule ExmrWeb.UserConfirmationInstructionsLiveTest do
|
||||||
|
|
||||||
{:ok, conn} =
|
{:ok, conn} =
|
||||||
lv
|
lv
|
||||||
|> form("#resend_confirmation_form", user: %{email: "unknown@example.com"})
|
|> form("#resend_confirmation_form", user: %{email: "unknown@vavakado.xyz"})
|
||||||
|> render_submit()
|
|> render_submit()
|
||||||
|> follow_redirect(conn, ~p"/")
|
|> follow_redirect(conn, ~p"/")
|
||||||
|
|
||||||
|
|
|
@ -52,7 +52,7 @@ defmodule ExmrWeb.UserForgotPasswordLiveTest do
|
||||||
|
|
||||||
{:ok, conn} =
|
{:ok, conn} =
|
||||||
lv
|
lv
|
||||||
|> form("#reset_password_form", user: %{"email" => "unknown@example.com"})
|
|> form("#reset_password_form", user: %{"email" => "unknown@vavakado.xyz"})
|
||||||
|> render_submit()
|
|> render_submit()
|
||||||
|> follow_redirect(conn, "/")
|
|> follow_redirect(conn, "/")
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@ defmodule Exmr.UsersFixtures do
|
||||||
entities via the `Exmr.Users` context.
|
entities via the `Exmr.Users` context.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def unique_user_email, do: "user#{System.unique_integer()}@example.com"
|
def unique_user_email, do: "user#{System.unique_integer()}@vavakado.xyz"
|
||||||
def valid_user_password, do: "hello world!"
|
def valid_user_password, do: "hello world!"
|
||||||
|
|
||||||
def valid_user_attributes(attrs \\ %{}) do
|
def valid_user_attributes(attrs \\ %{}) do
|
||||||
|
|
Loading…
Reference in a new issue