X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;f=test%2Femails%2Fadmin_email_test.exs;h=e24231e270553340075277cca73edb8cf4e5c2bd;hb=5e745567031e87ee0854dca8d10065449af27d9c;hp=bc871a0a9cc17a3196896e06c5804eeeeccf87b9;hpb=764a50f8a671cca69ca1f616754660506f8c18d8;p=akkoma diff --git a/test/emails/admin_email_test.exs b/test/emails/admin_email_test.exs index bc871a0a9..e24231e27 100644 --- a/test/emails/admin_email_test.exs +++ b/test/emails/admin_email_test.exs @@ -31,7 +31,7 @@ defmodule Pleroma.Emails.AdminEmailTest do account_url }\">#{account.nickname}
\nComment: 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