summaryrefslogtreecommitdiff
path: root/test/emails/mailer_test.exs
diff options
context:
space:
mode:
authorAlex Gleason <alex@alexgleason.me>2020-10-13 19:22:32 -0500
committerAlex Gleason <alex@alexgleason.me>2020-10-13 19:22:32 -0500
commitb3d6cf90229ff3e9a5bd0028d4a6cbd3b68da9fe (patch)
tree09f6b8bafcfb784c581800887d80a22d0461af0b /test/emails/mailer_test.exs
parent5c8d2c468c3a14cde029e7aeedd0cdb580cce1df (diff)
parent481906207e6d803e5c4d3e455c7b93119e392177 (diff)
downloadpleroma-b3d6cf90229ff3e9a5bd0028d4a6cbd3b68da9fe.tar.gz
pleroma-b3d6cf90229ff3e9a5bd0028d4a6cbd3b68da9fe.zip
Merge remote-tracking branch 'upstream/develop' into block-behavior
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