diff options
author | kaniini <nenolod@gmail.com> | 2018-12-27 19:22:31 +0000 |
---|---|---|
committer | kaniini <nenolod@gmail.com> | 2018-12-27 19:22:31 +0000 |
commit | 02866a42afde69f40724648757f6bdaab5a66d17 (patch) | |
tree | 0e0580cc9b29d7e27e6ca1f0792ec7e154782b4b /test/web/mastodon_api/mastodon_api_controller_test.exs | |
parent | 92b114499fff967caca7ab21b391d156aad1e544 (diff) | |
parent | e4562105e77dd2d580921a07f05907a63da1d826 (diff) | |
download | pleroma-02866a42afde69f40724648757f6bdaab5a66d17.tar.gz pleroma-02866a42afde69f40724648757f6bdaab5a66d17.zip |
Merge branch 'feature/exclude_reblogs' into 'develop'
Implement exclude_reblogs and include_rts
See merge request pleroma/pleroma!598
Diffstat (limited to 'test/web/mastodon_api/mastodon_api_controller_test.exs')
-rw-r--r-- | test/web/mastodon_api/mastodon_api_controller_test.exs | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/test/web/mastodon_api/mastodon_api_controller_test.exs b/test/web/mastodon_api/mastodon_api_controller_test.exs index 433c135f7..1737a5ebe 100644 --- a/test/web/mastodon_api/mastodon_api_controller_test.exs +++ b/test/web/mastodon_api/mastodon_api_controller_test.exs @@ -840,6 +840,26 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIControllerTest do assert [%{"id" => id}] = json_response(conn, 200) assert id == to_string(image_post.id) end + + test "gets a user's statuses without reblogs", %{conn: conn} do + user = insert(:user) + {:ok, post} = CommonAPI.post(user, %{"status" => "HI!!!"}) + {:ok, _, _} = CommonAPI.repeat(post.id, user) + + conn = + conn + |> get("/api/v1/accounts/#{user.id}/statuses", %{"exclude_reblogs" => "true"}) + + assert [%{"id" => id}] = json_response(conn, 200) + assert id == to_string(post.id) + + conn = + conn + |> get("/api/v1/accounts/#{user.id}/statuses", %{"exclude_reblogs" => "1"}) + + assert [%{"id" => id}] = json_response(conn, 200) + assert id == to_string(post.id) + end end describe "user relationships" do |