diff options
| author | lain <lain@soykaf.club> | 2019-08-08 16:04:20 +0200 |
|---|---|---|
| committer | lain <lain@soykaf.club> | 2019-08-08 16:04:20 +0200 |
| commit | a2b98f6d58218c5806247743aa0a2a600c9959ab (patch) | |
| tree | 49914ac1e30561e1180651ad6b0fef5d96ecfb5c /test/emails | |
| parent | e4a01d253ef7ab09d028198e5e39b9aba357486c (diff) | |
| parent | b18234e04c76daa564e0d8157dcd09566485da24 (diff) | |
| download | pleroma-a2b98f6d58218c5806247743aa0a2a600c9959ab.tar.gz pleroma-a2b98f6d58218c5806247743aa0a2a600c9959ab.zip | |
Merge remote-tracking branch 'origin/develop' into pleroma-conversations
Diffstat (limited to 'test/emails')
| -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 |
