diff options
| author | lain <lain@soykaf.club> | 2019-08-24 15:48:33 +0200 |
|---|---|---|
| committer | lain <lain@soykaf.club> | 2019-08-24 15:48:33 +0200 |
| commit | cc6c0b4ba6762e6a9b0a90c3dcda3f95283eb22a (patch) | |
| tree | e80078875de15734e045f39e0bd9f82310961201 /test/emails/admin_email_test.exs | |
| parent | 0e2b5a3e6aed7947909c2a1ff1618403546f1572 (diff) | |
| parent | bc78a875c86db42d67122cfb767f239a55dacbea (diff) | |
| download | pleroma-cc6c0b4ba6762e6a9b0a90c3dcda3f95283eb22a.tar.gz pleroma-cc6c0b4ba6762e6a9b0a90c3dcda3f95283eb22a.zip | |
Merge remote-tracking branch 'origin/develop' into sixohsix/pleroma-post_expiration
Diffstat (limited to 'test/emails/admin_email_test.exs')
| -rw-r--r-- | test/emails/admin_email_test.exs | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/test/emails/admin_email_test.exs b/test/emails/admin_email_test.exs index 4bf54b0c2..9e83c73c6 100644 --- a/test/emails/admin_email_test.exs +++ b/test/emails/admin_email_test.exs @@ -24,7 +24,6 @@ defmodule Pleroma.Emails.AdminEmailTest do assert res.to == [{to_user.name, to_user.email}] assert res.from == {config[:name], config[:notify_email]} - assert res.reply_to == {reporter.name, reporter.email} assert res.subject == "#{config[:name]} Report" assert res.html_body == @@ -34,4 +33,17 @@ defmodule Pleroma.Emails.AdminEmailTest do status_url }\">#{status_url}</li>\n </ul>\n</p>\n\n" end + + test "it works when the reporter is a remote user without email" do + config = Pleroma.Config.get(:instance) + to_user = insert(:user) + reporter = insert(:user, email: nil, local: false) + account = insert(:user) + + res = + AdminEmail.report(to_user, reporter, account, [%{name: "Test", id: "12"}], "Test comment") + + assert res.to == [{to_user.name, to_user.email}] + assert res.from == {config[:name], config[:notify_email]} + end end |
