diff options
| author | Ivan Tashkinov <ivantashkinov@gmail.com> | 2020-03-06 11:48:30 +0300 | 
|---|---|---|
| committer | Ivan Tashkinov <ivantashkinov@gmail.com> | 2020-03-06 11:48:30 +0300 | 
| commit | 027714b519cca63ac943369d0bcc9534ba448a80 (patch) | |
| tree | ab331c60efe243bd6eb79c95b67dc797bb165078 /test/web/mastodon_api/controllers/report_controller_test.exs | |
| parent | 40765875d41f181b4ac54a772b4c61d6afc0bc34 (diff) | |
| parent | 47604907c9d2379d0883d63bc7add5782cc25d63 (diff) | |
| download | pleroma-027714b519cca63ac943369d0bcc9534ba448a80.tar.gz pleroma-027714b519cca63ac943369d0bcc9534ba448a80.zip  | |
Merge remote-tracking branch 'remotes/origin/develop' into 1560-non-federating-instances-routes-restrictions
Diffstat (limited to 'test/web/mastodon_api/controllers/report_controller_test.exs')
| -rw-r--r-- | test/web/mastodon_api/controllers/report_controller_test.exs | 9 | 
1 files changed, 9 insertions, 0 deletions
diff --git a/test/web/mastodon_api/controllers/report_controller_test.exs b/test/web/mastodon_api/controllers/report_controller_test.exs index 1361b1420..34ec8119e 100644 --- a/test/web/mastodon_api/controllers/report_controller_test.exs +++ b/test/web/mastodon_api/controllers/report_controller_test.exs @@ -75,4 +75,13 @@ defmodule Pleroma.Web.MastodonAPI.ReportControllerTest do      assert json_response(conn, 400) == %{"error" => "Account not found"}    end + +  test "doesn't fail if an admin has no email", %{conn: conn, target_user: target_user} do +    insert(:user, %{is_admin: true, email: nil}) + +    assert %{"action_taken" => false, "id" => _} = +             conn +             |> post("/api/v1/reports", %{"account_id" => target_user.id}) +             |> json_response(200) +  end  end  | 
