diff options
author | Ivan Tashkinov <ivantashkinov@gmail.com> | 2020-04-01 19:49:09 +0300 |
---|---|---|
committer | Ivan Tashkinov <ivantashkinov@gmail.com> | 2020-04-01 19:49:09 +0300 |
commit | 2f2bd7fe72f474b7177c751a2dc3af716622ba91 (patch) | |
tree | 0f09b03ec1e06b25200571628f8bd0dac17d7e3d /test/web/mastodon_api/controllers/status_controller_test.exs | |
parent | bfec45bf740f9fcfcea92bbded6bd2c146dc64c1 (diff) | |
download | pleroma-2f2bd7fe72f474b7177c751a2dc3af716622ba91.tar.gz pleroma-2f2bd7fe72f474b7177c751a2dc3af716622ba91.zip |
Ability to control the output of account/pleroma/relationship in statuses in order to improve the rendering performance.
See `[:extensions, output_relationships_in_statuses_by_default]` setting and `with_relationships` param.
Diffstat (limited to 'test/web/mastodon_api/controllers/status_controller_test.exs')
-rw-r--r-- | test/web/mastodon_api/controllers/status_controller_test.exs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/test/web/mastodon_api/controllers/status_controller_test.exs b/test/web/mastodon_api/controllers/status_controller_test.exs index d59974d50..6b126217a 100644 --- a/test/web/mastodon_api/controllers/status_controller_test.exs +++ b/test/web/mastodon_api/controllers/status_controller_test.exs @@ -1043,6 +1043,8 @@ defmodule Pleroma.Web.MastodonAPI.StatusControllerTest do end test "bookmarks" do + bookmarks_uri = "/api/v1/bookmarks?with_relationships=true" + %{conn: conn} = oauth_access(["write:bookmarks", "read:bookmarks"]) author = insert(:user) @@ -1064,7 +1066,7 @@ defmodule Pleroma.Web.MastodonAPI.StatusControllerTest do assert json_response(response2, 200)["bookmarked"] == true - bookmarks = get(conn, "/api/v1/bookmarks") + bookmarks = get(conn, bookmarks_uri) assert [json_response(response2, 200), json_response(response1, 200)] == json_response(bookmarks, 200) @@ -1073,7 +1075,7 @@ defmodule Pleroma.Web.MastodonAPI.StatusControllerTest do assert json_response(response1, 200)["bookmarked"] == false - bookmarks = get(conn, "/api/v1/bookmarks") + bookmarks = get(conn, bookmarks_uri) assert [json_response(response2, 200)] == json_response(bookmarks, 200) end |