summaryrefslogtreecommitdiff
path: root/test/emails/mailer_test.exs
diff options
context:
space:
mode:
authorrinpatch <rinpatch@sdf.org>2020-11-12 12:34:48 +0000
committerrinpatch <rinpatch@sdf.org>2020-11-12 12:34:48 +0000
commit1172844ed18d94d84724dc6f11c6e9f72e0ba6ec (patch)
tree7d48a259e08856ab6db0eba255f20c0c19410463 /test/emails/mailer_test.exs
parenta0f5e8b27edbe2224d9c2c3997ad5b8ea484244b (diff)
parentb4c6b262d6dc12362f0014a864e8aed6c727c39c (diff)
downloadpleroma-1172844ed18d94d84724dc6f11c6e9f72e0ba6ec.tar.gz
pleroma-1172844ed18d94d84724dc6f11c6e9f72e0ba6ec.zip
Merge branch 'release/2.2.0' into 'stable'
Release/2.2.0 See merge request pleroma/secteam/pleroma!19
Diffstat (limited to 'test/emails/mailer_test.exs')
-rw-r--r--test/emails/mailer_test.exs55
1 files changed, 0 insertions, 55 deletions
diff --git a/test/emails/mailer_test.exs b/test/emails/mailer_test.exs
deleted file mode 100644
index 9e232d2a0..000000000
--- a/test/emails/mailer_test.exs
+++ /dev/null
@@ -1,55 +0,0 @@
-# Pleroma: A lightweight social networking server
-# Copyright © 2017-2020 Pleroma Authors <https://pleroma.social/>
-# SPDX-License-Identifier: AGPL-3.0-only
-
-defmodule Pleroma.Emails.MailerTest do
- use Pleroma.DataCase
- alias Pleroma.Emails.Mailer
-
- import Swoosh.TestAssertions
-
- @email %Swoosh.Email{
- from: {"Pleroma", "noreply@example.com"},
- html_body: "Test email",
- subject: "Pleroma test email",
- to: [{"Test User", "user1@example.com"}]
- }
- setup do: clear_config([Pleroma.Emails.Mailer, :enabled], true)
-
- test "not send email when mailer is disabled" do
- clear_config([Pleroma.Emails.Mailer, :enabled], false)
- Mailer.deliver(@email)
- :timer.sleep(100)
-
- refute_email_sent(
- from: {"Pleroma", "noreply@example.com"},
- to: [{"Test User", "user1@example.com"}],
- html_body: "Test email",
- subject: "Pleroma test email"
- )
- end
-
- test "send email" do
- Mailer.deliver(@email)
- :timer.sleep(100)
-
- assert_email_sent(
- from: {"Pleroma", "noreply@example.com"},
- to: [{"Test User", "user1@example.com"}],
- html_body: "Test email",
- subject: "Pleroma test email"
- )
- end
-
- test "perform" do
- Mailer.perform(:deliver_async, @email, [])
- :timer.sleep(100)
-
- assert_email_sent(
- from: {"Pleroma", "noreply@example.com"},
- to: [{"Test User", "user1@example.com"}],
- html_body: "Test email",
- subject: "Pleroma test email"
- )
- end
-end