updated Bamboo references to Swoosh; added runtime.exs config file

This commit is contained in:
Adam Piontek 2022-08-13 06:39:14 -04:00
parent 721ba53c15
commit d43daafdb7
11 changed files with 131 additions and 55 deletions
test/support/fixtures

View file

@ -33,11 +33,8 @@ defmodule Shift73k.AccountsFixtures do
end
def extract_user_token(fun) do
# {:ok, captured} = fun.(&"[TOKEN]#{&1}[TOKEN]")
# [_, token, _] = String.split(captured.body, "[TOKEN]")
# token
{:ok, %Bamboo.Email{} = email} = fun.(&"[TOKEN]#{&1}[TOKEN]")
[_, token, _] = String.split(email.text_body, "[TOKEN]")
{:ok, _, %Swoosh.Email{} = captured_email} = fun.(&"[TOKEN]#{&1}[TOKEN]")
[_, token | _] = String.split(captured_email.text_body, "[TOKEN]")
token
end