diff options
author | rinpatch <rinpatch@sdf.org> | 2020-02-11 00:04:06 +0000 |
---|---|---|
committer | rinpatch <rinpatch@sdf.org> | 2020-02-11 00:04:06 +0000 |
commit | 94e5ca11054567e0edc15ef3a350f02c386d3ead (patch) | |
tree | 36f42f1532c76e44d3959e368a046bff474aea3b /test/daemons/digest_email_daemon_test.exs | |
parent | a7287e2e3a9291469c489a5a1df26480fdeab3a3 (diff) | |
parent | 6813c0302c2b665d337d5f5831d2df6312b6b277 (diff) | |
download | pleroma-94e5ca11054567e0edc15ef3a350f02c386d3ead.tar.gz pleroma-94e5ca11054567e0edc15ef3a350f02c386d3ead.zip |
Merge branch 'issue/1383' into 'develop'
[#1383] Switch periodic jobs from quantum to oban
See merge request pleroma/pleroma!2015
Diffstat (limited to 'test/daemons/digest_email_daemon_test.exs')
-rw-r--r-- | test/daemons/digest_email_daemon_test.exs | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/test/daemons/digest_email_daemon_test.exs b/test/daemons/digest_email_daemon_test.exs deleted file mode 100644 index faf592d5f..000000000 --- a/test/daemons/digest_email_daemon_test.exs +++ /dev/null @@ -1,35 +0,0 @@ -# Pleroma: A lightweight social networking server -# Copyright © 2017-2019 Pleroma Authors <https://pleroma.social/> -# SPDX-License-Identifier: AGPL-3.0-only - -defmodule Pleroma.DigestEmailDaemonTest do - use Pleroma.DataCase - import Pleroma.Factory - - alias Pleroma.Daemons.DigestEmailDaemon - alias Pleroma.Tests.ObanHelpers - alias Pleroma.User - alias Pleroma.Web.CommonAPI - - test "it sends digest emails" do - user = insert(:user) - - date = - Timex.now() - |> Timex.shift(days: -10) - |> Timex.to_naive_datetime() - - user2 = insert(:user, last_digest_emailed_at: date) - {:ok, _} = User.switch_email_notifications(user2, "digest", true) - CommonAPI.post(user, %{"status" => "hey @#{user2.nickname}!"}) - - DigestEmailDaemon.perform() - ObanHelpers.perform_all() - # Performing job(s) enqueued at previous step - ObanHelpers.perform_all() - - assert_received {:email, email} - assert email.to == [{user2.name, user2.email}] - assert email.subject == "Your digest from #{Pleroma.Config.get(:instance)[:name]}" - end -end |