From fc85c9f086cd5dd73effa28cb68fb245a554fa98 Mon Sep 17 00:00:00 2001 From: Roger Braun Date: Thu, 14 Sep 2017 13:22:09 +0200 Subject: Add tag timelines. --- test/web/mastodon_api/mastodon_api_controller_test.exs | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'test') 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 -- cgit v1.2.3