implemented bamboo mailer, satisfying tests
This commit is contained in:
parent
613ab2c80a
commit
370ac77cfd
9 changed files with 57 additions and 19 deletions
test/support/fixtures
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue