diff options
author | Maxim Filippov <colixer@gmail.com> | 2019-10-23 21:27:22 +0200 |
---|---|---|
committer | Maxim Filippov <colixer@gmail.com> | 2019-10-23 21:27:22 +0200 |
commit | b08b1d5d91968fbe94e20897ee3529216dd50a0a (patch) | |
tree | f6ddca23902707e98fad604caac910a2ae91d490 /test/web/common_api/common_api_test.exs | |
parent | 90d516d42bd3d29e71e364535dd4208f8a54992a (diff) | |
download | pleroma-b08b1d5d91968fbe94e20897ee3529216dd50a0a.tar.gz pleroma-b08b1d5d91968fbe94e20897ee3529216dd50a0a.zip |
Store status data inside Flag activity
Diffstat (limited to 'test/web/common_api/common_api_test.exs')
-rw-r--r-- | test/web/common_api/common_api_test.exs | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/test/web/common_api/common_api_test.exs b/test/web/common_api/common_api_test.exs index 83df44c36..709aa4dbe 100644 --- a/test/web/common_api/common_api_test.exs +++ b/test/web/common_api/common_api_test.exs @@ -10,6 +10,7 @@ defmodule Pleroma.Web.CommonAPITest do alias Pleroma.User alias Pleroma.Web.ActivityPub.ActivityPub alias Pleroma.Web.ActivityPub.Visibility + alias Pleroma.Web.AdminAPI.AccountView alias Pleroma.Web.CommonAPI import Pleroma.Factory @@ -385,6 +386,14 @@ defmodule Pleroma.Web.CommonAPITest do "status_ids" => [activity.id] } + note_obj = %{ + "type" => "Note", + "id" => activity_ap_id, + "content" => "foobar", + "published" => activity.object.data["published"], + "actor" => AccountView.render("show.json", %{user: target_user}) + } + assert {:ok, flag_activity} = CommonAPI.report(reporter, report_data) assert %Activity{ @@ -392,7 +401,7 @@ defmodule Pleroma.Web.CommonAPITest do data: %{ "type" => "Flag", "content" => ^comment, - "object" => [^target_ap_id, ^activity_ap_id], + "object" => [^target_ap_id, ^note_obj], "state" => "open" } } = flag_activity |