X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;f=test%2Femails%2Fadmin_email_test.exs;h=e24231e270553340075277cca73edb8cf4e5c2bd;hb=073f5490ece616fd9602382c1be1347457cbbe79;hp=31eac5f12b93f14dec818680d500ca6128a908d7;hpb=1a858134edabfe9a85e07fb801b9ed41649ba08a;p=akkoma
diff --git a/test/emails/admin_email_test.exs b/test/emails/admin_email_test.exs
index 31eac5f12..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