diff options
| author | Ivan Tashkinov <ivantashkinov@gmail.com> | 2019-08-22 20:59:58 +0300 |
|---|---|---|
| committer | Ivan Tashkinov <ivantashkinov@gmail.com> | 2019-08-22 20:59:58 +0300 |
| commit | 256ff09aa8068166a9f83e3159f060fd4598af76 (patch) | |
| tree | a5e5efa83241f28d8d241b9d2d95ca4ceaefd286 /test/mix | |
| parent | 8778c16dac1789eeb6dd51524573163216200b5d (diff) | |
| parent | 73884441f31092bdb2f509950daf9bd3889a9a8b (diff) | |
| download | pleroma-256ff09aa8068166a9f83e3159f060fd4598af76.tar.gz pleroma-256ff09aa8068166a9f83e3159f060fd4598af76.zip | |
[#1149] Merge remote-tracking branch 'remotes/upstream/develop' into 1149-oban-job-queue
# Conflicts:
# lib/pleroma/application.ex
# lib/pleroma/scheduled_activity_worker.ex
# lib/pleroma/web/federator/retry_queue.ex
# lib/pleroma/web/oauth/token/clean_worker.ex
# test/user_test.exs
# test/web/federator_test.exs
Diffstat (limited to 'test/mix')
| -rw-r--r-- | test/mix/tasks/pleroma.digest_test.exs | 54 |
1 files changed, 0 insertions, 54 deletions
diff --git a/test/mix/tasks/pleroma.digest_test.exs b/test/mix/tasks/pleroma.digest_test.exs deleted file mode 100644 index 5fbeac0d6..000000000 --- a/test/mix/tasks/pleroma.digest_test.exs +++ /dev/null @@ -1,54 +0,0 @@ -defmodule Mix.Tasks.Pleroma.DigestTest do - use Pleroma.DataCase - - import Pleroma.Factory - import Swoosh.TestAssertions - - alias Pleroma.Tests.ObanHelpers - alias Pleroma.Web.CommonAPI - - setup_all do - Mix.shell(Mix.Shell.Process) - - on_exit(fn -> - Mix.shell(Mix.Shell.IO) - end) - - :ok - end - - describe "pleroma.digest test" do - test "Sends digest to the given user" do - user1 = insert(:user) - user2 = insert(:user) - - Enum.each(0..10, fn i -> - {:ok, _activity} = - CommonAPI.post(user1, %{ - "status" => "hey ##{i} @#{user2.nickname}!" - }) - end) - - yesterday = - NaiveDateTime.add( - NaiveDateTime.truncate(NaiveDateTime.utc_now(), :second), - -60 * 60 * 24, - :second - ) - - {:ok, yesterday_date} = Timex.format(yesterday, "%F", :strftime) - - :ok = Mix.Tasks.Pleroma.Digest.run(["test", user2.nickname, yesterday_date]) - - ObanHelpers.perform_all() - - assert_receive {:mix_shell, :info, [message]} - assert message =~ "Digest email have been sent" - - assert_email_sent( - to: {user2.name, user2.email}, - html_body: ~r/new mentions:/i - ) - end - end -end |
