Merge branch 'develop' of git.pleroma.social:pleroma/pleroma into object-normalize...
[akkoma] / test / pleroma / emails / user_email_test.exs
index d81eff004cf19baf00387dd37d74fd7588a5244f..bd21d8dec52b8f14bc8b5fefc532eaea39dd68c1 100644 (file)
@@ -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