diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/web/mastodon_api/mastodon_api_controller_test.exs | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/test/web/mastodon_api/mastodon_api_controller_test.exs b/test/web/mastodon_api/mastodon_api_controller_test.exs index d88714cf2..25b4f2b37 100644 --- a/test/web/mastodon_api/mastodon_api_controller_test.exs +++ b/test/web/mastodon_api/mastodon_api_controller_test.exs @@ -186,7 +186,6 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIControllerTest do test "returns the relationships for the current user", %{conn: conn} do user = insert(:user) other_user = insert(:user) - {:ok, user} = User.follow(user, other_user) conn = conn @@ -227,4 +226,18 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIControllerTest do assert media["type"] == "image" end + + test "hashtag timeline", %{conn: conn} do + following = insert(:user) + + {:ok, activity} = TwitterAPI.create_status(following, %{"status" => "test #2hu"}) + {:ok, [_activity]} = OStatus.fetch_activity_from_url("https://shitposter.club/notice/2827873") + + conn = conn + |> get("/api/v1/timelines/tag/2hu") + + assert [%{"id" => id}] = json_response(conn, 200) + + assert id == activity.id + end end |