diff options
author | lain <lain@soykaf.club> | 2020-05-01 12:48:56 +0000 |
---|---|---|
committer | lain <lain@soykaf.club> | 2020-05-01 12:48:56 +0000 |
commit | 607e06c245e8a36d7b720d71b45e1fc962ede3ab (patch) | |
tree | 00931f919f1abc7943ea2008100f5093f0d21457 /test/web/admin_api/views | |
parent | 44fbd09709b43a7eedff60365c3ff487dbd7a5c9 (diff) | |
parent | 1898054da4bcccb25e0bcd9d6463af38ced43351 (diff) | |
download | pleroma-607e06c245e8a36d7b720d71b45e1fc962ede3ab.tar.gz pleroma-607e06c245e8a36d7b720d71b45e1fc962ede3ab.zip |
Merge branch 'openapi/reports' into 'develop'
Add OpenAPI spec for ReportController
See merge request pleroma/pleroma!2434
Diffstat (limited to 'test/web/admin_api/views')
-rw-r--r-- | test/web/admin_api/views/report_view_test.exs | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/test/web/admin_api/views/report_view_test.exs b/test/web/admin_api/views/report_view_test.exs index 5db6629f2..8cfa1dcfa 100644 --- a/test/web/admin_api/views/report_view_test.exs +++ b/test/web/admin_api/views/report_view_test.exs @@ -15,7 +15,7 @@ defmodule Pleroma.Web.AdminAPI.ReportViewTest do user = insert(:user) other_user = insert(:user) - {:ok, activity} = CommonAPI.report(user, %{"account_id" => other_user.id}) + {:ok, activity} = CommonAPI.report(user, %{account_id: other_user.id}) expected = %{ content: nil, @@ -48,7 +48,7 @@ defmodule Pleroma.Web.AdminAPI.ReportViewTest do {:ok, activity} = CommonAPI.post(other_user, %{"status" => "toot"}) {:ok, report_activity} = - CommonAPI.report(user, %{"account_id" => other_user.id, "status_ids" => [activity.id]}) + CommonAPI.report(user, %{account_id: other_user.id, status_ids: [activity.id]}) other_user = Pleroma.User.get_by_id(other_user.id) @@ -81,7 +81,7 @@ defmodule Pleroma.Web.AdminAPI.ReportViewTest do user = insert(:user) other_user = insert(:user) - {:ok, activity} = CommonAPI.report(user, %{"account_id" => other_user.id}) + {:ok, activity} = CommonAPI.report(user, %{account_id: other_user.id}) {:ok, activity} = CommonAPI.update_report_state(activity.id, "closed") assert %{state: "closed"} = @@ -94,8 +94,8 @@ defmodule Pleroma.Web.AdminAPI.ReportViewTest do {:ok, activity} = CommonAPI.report(user, %{ - "account_id" => other_user.id, - "comment" => "posts are too good for this instance" + account_id: other_user.id, + comment: "posts are too good for this instance" }) assert %{content: "posts are too good for this instance"} = @@ -108,8 +108,8 @@ defmodule Pleroma.Web.AdminAPI.ReportViewTest do {:ok, activity} = CommonAPI.report(user, %{ - "account_id" => other_user.id, - "comment" => "" + account_id: other_user.id, + comment: "" }) data = Map.put(activity.data, "content", "<script> alert('hecked :D:D:D:D:D:D:D') </script>") @@ -125,8 +125,8 @@ defmodule Pleroma.Web.AdminAPI.ReportViewTest do {:ok, activity} = CommonAPI.report(user, %{ - "account_id" => other_user.id, - "comment" => "" + account_id: other_user.id, + comment: "" }) Pleroma.User.delete(other_user) |