X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;ds=sidebyside;f=test%2Femails%2Fadmin_email_test.exs;h=e24231e270553340075277cca73edb8cf4e5c2bd;hb=073f5490ece616fd9602382c1be1347457cbbe79;hp=383cc3459285670a7108edfa3e0074e94a4004a6;hpb=293281fcbdba793604316f16f42d0de5ed816941;p=akkoma
diff --git a/test/emails/admin_email_test.exs b/test/emails/admin_email_test.exs
index 383cc3459..e24231e27 100644
--- a/test/emails/admin_email_test.exs
+++ b/test/emails/admin_email_test.exs
@@ -1,5 +1,5 @@
# Pleroma: A lightweight social networking server
-# Copyright © 2017-2019 Pleroma Authors
Comment: Test comment\n
Statuses:\n
\nView Reports in AdminFE\n" end test "it works when the reporter is a remote user without email" do @@ -46,4 +46,24 @@ defmodule Pleroma.Emails.AdminEmailTest do assert res.to == [{to_user.name, to_user.email}] assert res.from == {config[:name], config[:notify_email]} end + + test "new unapproved registration email" do + config = Pleroma.Config.get(:instance) + to_user = insert(:user) + account = insert(:user, registration_reason: "Plz let me in") + + res = AdminEmail.new_unapproved_registration(to_user, account) + + account_url = Helpers.user_feed_url(Pleroma.Web.Endpoint, :feed_redirect, account.id) + + assert res.to == [{to_user.name, to_user.email}] + assert res.from == {config[:name], config[:notify_email]} + assert res.subject == "New account up for review on #{config[:name]} (@#{account.nickname})" + + assert res.html_body == """ +
New account for review: @#{account.nickname}
+Plz let me in+ Visit AdminFE + """ + end end