Fix tests
This commit is contained in:
parent
7718a215e9
commit
f6036ce3b9
1 changed files with 11 additions and 2 deletions
|
@ -28,9 +28,18 @@ defmodule Mix.Tasks.Pleroma.DigestTest do
|
||||||
})
|
})
|
||||||
end)
|
end)
|
||||||
|
|
||||||
Mix.Tasks.Pleroma.Digest.run(["test", user2.nickname])
|
yesterday =
|
||||||
|
NaiveDateTime.add(
|
||||||
|
NaiveDateTime.truncate(NaiveDateTime.utc_now(), :second),
|
||||||
|
-60 * 60 * 24,
|
||||||
|
:second
|
||||||
|
)
|
||||||
|
|
||||||
assert_received {:mix_shell, :info, [message]}
|
{:ok, yesterday_date} = Timex.format(yesterday, "%F", :strftime)
|
||||||
|
|
||||||
|
:ok = Mix.Tasks.Pleroma.Digest.run(["test", user2.nickname, yesterday_date])
|
||||||
|
|
||||||
|
assert_receive {:mix_shell, :info, [message]}
|
||||||
assert message =~ "Digest email have been sent"
|
assert message =~ "Digest email have been sent"
|
||||||
|
|
||||||
assert_email_sent(
|
assert_email_sent(
|
||||||
|
|
Loading…
Reference in a new issue