summaryrefslogtreecommitdiff
path: root/test/web/mastodon_api/controllers/status_controller_test.exs
diff options
context:
space:
mode:
authorIvan Tashkinov <ivantashkinov@gmail.com>2020-08-07 09:38:05 +0300
committerIvan Tashkinov <ivantashkinov@gmail.com>2020-08-07 09:38:05 +0300
commit1298a2ea2c63f14cc080eb549377c6a1274b1628 (patch)
treefe50b19542682173af1314766571731f69e904f5 /test/web/mastodon_api/controllers/status_controller_test.exs
parentb8021016ebef23903c59e5140d4efb456a84a347 (diff)
parentb9ebb55d2aabdf4c99b05efab9d4ad31b25f888d (diff)
downloadpleroma-1298a2ea2c63f14cc080eb549377c6a1274b1628.tar.gz
pleroma-1298a2ea2c63f14cc080eb549377c6a1274b1628.zip
Merge remote-tracking branch 'remotes/origin/develop' into 2168-media-preview-proxy
# Conflicts: # mix.lock
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