summaryrefslogtreecommitdiff
path: root/test/web/mastodon_api/controllers/status_controller_test.exs
diff options
context:
space:
mode:
authorAlex Gleason <alex@alexgleason.me>2020-08-05 13:08:31 -0500
committerAlex Gleason <alex@alexgleason.me>2020-08-05 13:08:31 -0500
commitcc196e2cd57966889021342405ebc8fd0763e83a (patch)
tree232051460624a0fd0720ed04cc5512208ce1989b /test/web/mastodon_api/controllers/status_controller_test.exs
parentad9c925efb77287316f5dbac26f6a1b16662910a (diff)
parent7755f49e281e4990db5317b33d6b8e0d12982e0c (diff)
downloadpleroma-cc196e2cd57966889021342405ebc8fd0763e83a.tar.gz
pleroma-cc196e2cd57966889021342405ebc8fd0763e83a.zip
Merge remote-tracking branch 'upstream/develop' into restrict-domain
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