X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;ds=sidebyside;f=test%2Femails%2Fadmin_email_test.exs;h=155057f3e1b2a399801202e688829347e48a140e;hb=66e00ace7c0708f2f9361bc6e1008ccea08cb6ef;hp=02c277a339803b75e533cf017d7e9d88a9037566;hpb=1d8e956c32e412283aed0cebf90df11121d897bb;p=akkoma
diff --git a/test/emails/admin_email_test.exs b/test/emails/admin_email_test.exs
index 02c277a33..155057f3e 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