summaryrefslogtreecommitdiff
path: root/test/web/common_api/common_api_test.exs
diff options
context:
space:
mode:
authorlain <lain@soykaf.club>2020-05-01 12:48:56 +0000
committerlain <lain@soykaf.club>2020-05-01 12:48:56 +0000
commit607e06c245e8a36d7b720d71b45e1fc962ede3ab (patch)
tree00931f919f1abc7943ea2008100f5093f0d21457 /test/web/common_api/common_api_test.exs
parent44fbd09709b43a7eedff60365c3ff487dbd7a5c9 (diff)
parent1898054da4bcccb25e0bcd9d6463af38ced43351 (diff)
downloadpleroma-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/common_api/common_api_test.exs')
-rw-r--r--test/web/common_api/common_api_test.exs30
1 files changed, 15 insertions, 15 deletions
diff --git a/test/web/common_api/common_api_test.exs b/test/web/common_api/common_api_test.exs
index 1758662b0..c6ccc02c4 100644
--- a/test/web/common_api/common_api_test.exs
+++ b/test/web/common_api/common_api_test.exs
@@ -485,9 +485,9 @@ defmodule Pleroma.Web.CommonAPITest do
comment = "foobar"
report_data = %{
- "account_id" => target_user.id,
- "comment" => comment,
- "status_ids" => [activity.id]
+ account_id: target_user.id,
+ comment: comment,
+ status_ids: [activity.id]
}
note_obj = %{
@@ -517,9 +517,9 @@ defmodule Pleroma.Web.CommonAPITest do
{:ok, %Activity{id: report_id}} =
CommonAPI.report(reporter, %{
- "account_id" => target_user.id,
- "comment" => "I feel offended",
- "status_ids" => [activity.id]
+ account_id: target_user.id,
+ comment: "I feel offended",
+ status_ids: [activity.id]
})
{:ok, report} = CommonAPI.update_report_state(report_id, "resolved")
@@ -538,9 +538,9 @@ defmodule Pleroma.Web.CommonAPITest do
{:ok, %Activity{id: report_id}} =
CommonAPI.report(reporter, %{
- "account_id" => target_user.id,
- "comment" => "I feel offended",
- "status_ids" => [activity.id]
+ account_id: target_user.id,
+ comment: "I feel offended",
+ status_ids: [activity.id]
})
assert CommonAPI.update_report_state(report_id, "test") == {:error, "Unsupported state"}
@@ -552,16 +552,16 @@ defmodule Pleroma.Web.CommonAPITest do
{:ok, %Activity{id: first_report_id}} =
CommonAPI.report(reporter, %{
- "account_id" => target_user.id,
- "comment" => "I feel offended",
- "status_ids" => [activity.id]
+ account_id: target_user.id,
+ comment: "I feel offended",
+ status_ids: [activity.id]
})
{:ok, %Activity{id: second_report_id}} =
CommonAPI.report(reporter, %{
- "account_id" => target_user.id,
- "comment" => "I feel very offended!",
- "status_ids" => [activity.id]
+ account_id: target_user.id,
+ comment: "I feel very offended!",
+ status_ids: [activity.id]
})
{:ok, report_ids} =