diff options
author | Alex Gleason <alex@alexgleason.me> | 2020-08-07 16:35:15 -0500 |
---|---|---|
committer | Alex Gleason <alex@alexgleason.me> | 2020-08-07 16:35:15 -0500 |
commit | 1a5a7ba6e8a936d3138ca530d3466111e542aef6 (patch) | |
tree | c056138ee21661af45d2363ce01282aafffb3fc0 /test/web/mastodon_api/controllers/status_controller_test.exs | |
parent | bd1e2e3a58ebd702306e7a6e2df985ac07e5f7d8 (diff) | |
parent | 47698fc322da58894dd41c1bfd5ca0376200dc5e (diff) | |
download | pleroma-1a5a7ba6e8a936d3138ca530d3466111e542aef6.tar.gz pleroma-1a5a7ba6e8a936d3138ca530d3466111e542aef6.zip |
Merge remote-tracking branch 'upstream/develop' into aliases
Diffstat (limited to 'test/web/mastodon_api/controllers/status_controller_test.exs')
-rw-r--r-- | test/web/mastodon_api/controllers/status_controller_test.exs | 14 |
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 |