diff options
author | lain <lain@soykaf.club> | 2020-06-02 10:43:13 +0200 |
---|---|---|
committer | lain <lain@soykaf.club> | 2020-06-02 10:43:13 +0200 |
commit | 8e1db6a8352754fd70c51ab8527b71180aa15a5b (patch) | |
tree | ea12ca93e5d22e407440d75bb70fce2ac6e140ab /test/web/mastodon_api/controllers/timeline_controller_test.exs | |
parent | af9090238e1f71e6b081fbd09c09a5975d2ed99e (diff) | |
parent | 6fb900a496e1797c1a3b438db9f96b09d9546f1d (diff) | |
download | pleroma-8e1db6a8352754fd70c51ab8527b71180aa15a5b.tar.gz pleroma-8e1db6a8352754fd70c51ab8527b71180aa15a5b.zip |
Merge branch 'develop' of git.pleroma.social:pleroma/pleroma into remake-remodel-dms
Diffstat (limited to 'test/web/mastodon_api/controllers/timeline_controller_test.exs')
-rw-r--r-- | test/web/mastodon_api/controllers/timeline_controller_test.exs | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/test/web/mastodon_api/controllers/timeline_controller_test.exs b/test/web/mastodon_api/controllers/timeline_controller_test.exs index 2375ac8e8..65b4079fe 100644 --- a/test/web/mastodon_api/controllers/timeline_controller_test.exs +++ b/test/web/mastodon_api/controllers/timeline_controller_test.exs @@ -60,9 +60,9 @@ defmodule Pleroma.Web.MastodonAPI.TimelineControllerTest do describe "public" do @tag capture_log: true test "the public timeline", %{conn: conn} do - following = insert(:user) + user = insert(:user) - {:ok, _activity} = CommonAPI.post(following, %{status: "test"}) + {:ok, activity} = CommonAPI.post(user, %{status: "test"}) _activity = insert(:note_activity, local: false) @@ -77,6 +77,13 @@ defmodule Pleroma.Web.MastodonAPI.TimelineControllerTest do conn = get(build_conn(), "/api/v1/timelines/public?local=1") assert [%{"content" => "test"}] = json_response_and_validate_schema(conn, :ok) + + # does not contain repeats + {:ok, _} = CommonAPI.repeat(activity.id, user) + + conn = get(build_conn(), "/api/v1/timelines/public?local=true") + + assert [_] = json_response_and_validate_schema(conn, :ok) end test "the public timeline includes only public statuses for an authenticated user" do |