implemented bamboo mailer, satisfying tests

This commit is contained in:
Adam Piontek 2021-02-24 15:52:42 -05:00
parent 613ab2c80a
commit 370ac77cfd
9 changed files with 57 additions and 19 deletions
test/support/fixtures

View file

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