diff options
| author | kaniini <ariadne@dereferenced.org> | 2019-08-04 22:24:50 +0000 | 
|---|---|---|
| committer | kaniini <ariadne@dereferenced.org> | 2019-08-04 22:24:50 +0000 | 
| commit | fd60fd4713c72f257f81d6067febbcf18d643e76 (patch) | |
| tree | 788adf2a3a380a4df8d02defbd9761092bca9ccb /test | |
| parent | f7fc902c2917ce678f0dd6a69178dfcff45a6e96 (diff) | |
| parent | 96028cd585ac23a4233f41a6307d80979dd0e3a7 (diff) | |
| download | pleroma-fd60fd4713c72f257f81d6067febbcf18d643e76.tar.gz pleroma-fd60fd4713c72f257f81d6067febbcf18d643e76.zip | |
Merge branch 'report-email-from-remote-user' into 'develop'
Remove Reply-To from report emails
Closes #1141
See merge request pleroma/pleroma!1531
Diffstat (limited to 'test')
| -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 | 
