diff options
| author | Ivan Tashkinov <ivantashkinov@gmail.com> | 2020-08-07 09:38:05 +0300 |
|---|---|---|
| committer | Ivan Tashkinov <ivantashkinov@gmail.com> | 2020-08-07 09:38:05 +0300 |
| commit | 1298a2ea2c63f14cc080eb549377c6a1274b1628 (patch) | |
| tree | fe50b19542682173af1314766571731f69e904f5 /test/emails/admin_email_test.exs | |
| parent | b8021016ebef23903c59e5140d4efb456a84a347 (diff) | |
| parent | b9ebb55d2aabdf4c99b05efab9d4ad31b25f888d (diff) | |
| download | pleroma-1298a2ea2c63f14cc080eb549377c6a1274b1628.tar.gz pleroma-1298a2ea2c63f14cc080eb549377c6a1274b1628.zip | |
Merge remote-tracking branch 'remotes/origin/develop' into 2168-media-preview-proxy
# Conflicts:
# mix.lock
Diffstat (limited to 'test/emails/admin_email_test.exs')
| -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 |
