diff options
author | lain <lain@soykaf.club> | 2020-07-29 11:27:26 +0000 |
---|---|---|
committer | lain <lain@soykaf.club> | 2020-07-29 11:27:26 +0000 |
commit | 79f9ddd8b725519f719219b70b8dd8558d5212cf (patch) | |
tree | 24f6940744d9d832ea3ab2747e7d1c2fe890fb3a /test/emails | |
parent | 93dbba9b8a5aacbbf43a45a07e27b328579eabf8 (diff) | |
parent | f688c8df82b955b50552b3198ddc153a716451c2 (diff) | |
download | pleroma-79f9ddd8b725519f719219b70b8dd8558d5212cf.tar.gz pleroma-79f9ddd8b725519f719219b70b8dd8558d5212cf.zip |
Merge branch 'by-approval' into 'develop'
Registrations "by approval" mode
Closes #1931
See merge request pleroma/pleroma!2757
Diffstat (limited to 'test/emails')
-rw-r--r-- | test/emails/admin_email_test.exs | 20 |
1 files changed, 20 insertions, 0 deletions
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 == """ + <p>New account for review: <a href="#{account_url}">@#{account.nickname}</a></p> + <blockquote>Plz let me in</blockquote> + <a href="http://localhost:4001/pleroma/admin">Visit AdminFE</a> + """ + end end |