X-Git-Url: https://git.squeep.com/?a=blobdiff_plain;ds=sidebyside;f=test%2Fpleroma%2Femails%2Fuser_email_test.exs;h=21fd06ea67c4a03d736c7f8e4698797efcd1be76;hb=9b5dbd20b09a7463c4dde60fe70a8264cfbd90e3;hp=a75623bb41aa3c72cd3a532e6db38c3ce2545d68;hpb=409f694e4f90d34285b43c7e7afc594bc386d893;p=akkoma
diff --git a/test/pleroma/emails/user_email_test.exs b/test/pleroma/emails/user_email_test.exs
index a75623bb4..21fd06ea6 100644
--- a/test/pleroma/emails/user_email_test.exs
+++ b/test/pleroma/emails/user_email_test.exs
@@ -1,9 +1,9 @@
# Pleroma: A lightweight social networking server
-# Copyright © 2017-2020 Pleroma Authors
+# Copyright © 2017-2021 Pleroma Authors
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Emails.UserEmailTest do
- use Pleroma.DataCase
+ use Pleroma.DataCase, async: true
alias Pleroma.Emails.UserEmail
alias Pleroma.Web.Endpoint
@@ -45,4 +45,15 @@ defmodule Pleroma.Emails.UserEmailTest do
assert email.html_body =~
Router.Helpers.confirm_email_url(Endpoint, :confirm_email, user.id, "conf-token")
end
+
+ test "build approval pending email" do
+ config = Pleroma.Config.get(:instance)
+ user = insert(:user)
+ email = UserEmail.approval_pending_email(user)
+
+ assert email.from == {config[:name], config[:notify_email]}
+ assert email.to == [{user.name, user.email}]
+ assert email.subject == "Your account is awaiting approval"
+ assert email.html_body =~ "Awaiting Approval"
+ end
end