summaryrefslogtreecommitdiff
path: root/test/web/mastodon_api/controllers/status_controller_test.exs
diff options
context:
space:
mode:
authorlain <lain@soykaf.club>2020-07-30 12:41:47 +0000
committerlain <lain@soykaf.club>2020-07-30 12:41:47 +0000
commit873ff5ce1402ae6138f4a66dd0d71c462c0b1ece (patch)
tree9c717d08dc65e33b3757f38c8bc37c6ad89b2616 /test/web/mastodon_api/controllers/status_controller_test.exs
parentd39b72c8fa8b338d6afd02af3d0870ccca391aba (diff)
parent00d090004eefdf6cf2cf644be1d4dcfdd8b0ba35 (diff)
downloadpleroma-873ff5ce1402ae6138f4a66dd0d71c462c0b1ece.tar.gz
pleroma-873ff5ce1402ae6138f4a66dd0d71c462c0b1ece.zip
Merge branch 'hide-reactions' into 'develop'
Let favourites and emoji reactions optionally be hidden See merge request pleroma/pleroma!2804
Diffstat (limited to 'test/web/mastodon_api/controllers/status_controller_test.exs')
-rw-r--r--test/web/mastodon_api/controllers/status_controller_test.exs14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/web/mastodon_api/controllers/status_controller_test.exs b/test/web/mastodon_api/controllers/status_controller_test.exs
index d34f300da..5955d8334 100644
--- a/test/web/mastodon_api/controllers/status_controller_test.exs
+++ b/test/web/mastodon_api/controllers/status_controller_test.exs
@@ -1432,6 +1432,20 @@ defmodule Pleroma.Web.MastodonAPI.StatusControllerTest do
[%{"id" => id}] = response
assert id == other_user.id
end
+
+ test "returns empty array when :show_reactions is disabled", %{conn: conn, activity: activity} do
+ clear_config([:instance, :show_reactions], false)
+
+ other_user = insert(:user)
+ {:ok, _} = CommonAPI.favorite(other_user, activity.id)
+
+ response =
+ conn
+ |> get("/api/v1/statuses/#{activity.id}/favourited_by")
+ |> json_response_and_validate_schema(:ok)
+
+ assert Enum.empty?(response)
+ end
end
describe "GET /api/v1/statuses/:id/reblogged_by" do