summaryrefslogtreecommitdiff
path: root/test/web/mastodon_api/controllers/status_controller_test.exs
diff options
context:
space:
mode:
authorlain <lain@soykaf.club>2020-08-04 15:28:41 +0200
committerlain <lain@soykaf.club>2020-08-04 15:28:41 +0200
commit878c7f3f309aa5aaa9eababc2c863248dd4420bb (patch)
treee2c76471b95ee9460989aeedf4ebfa4843b11cba /test/web/mastodon_api/controllers/status_controller_test.exs
parent0f088d8ce35150d7baa0591a25c831fce0181239 (diff)
parent28584bb2241c600fc6150fdae49b1eea6bd420e0 (diff)
downloadpleroma-878c7f3f309aa5aaa9eababc2c863248dd4420bb.tar.gz
pleroma-878c7f3f309aa5aaa9eababc2c863248dd4420bb.zip
Merge branch 'develop' of git.pleroma.social:pleroma/pleroma into features/poll-validation
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