X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;f=test%2Femails%2Fadmin_email_test.exs;h=e24231e270553340075277cca73edb8cf4e5c2bd;hb=5e745567031e87ee0854dca8d10065449af27d9c;hp=9082ae5a7c2a7eaabdff516b2ab7f74d43e013a2;hpb=8f9ee694ed47709231ffc852d2e82a06468cba06;p=akkoma diff --git a/test/emails/admin_email_test.exs b/test/emails/admin_email_test.exs index 9082ae5a7..e24231e27 100644 --- a/test/emails/admin_email_test.exs +++ b/test/emails/admin_email_test.exs @@ -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