summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorRoger Braun <rbraun@Bobble.local>2017-09-14 13:22:09 +0200
committerRoger Braun <rbraun@Bobble.local>2017-09-14 13:22:09 +0200
commitfc85c9f086cd5dd73effa28cb68fb245a554fa98 (patch)
tree070041e5c5a1b9be254448f6aff732867b8828bb /test
parentb0363e80556b4c8271ab69d2680166ca844f660c (diff)
downloadpleroma-fc85c9f086cd5dd73effa28cb68fb245a554fa98.tar.gz
pleroma-fc85c9f086cd5dd73effa28cb68fb245a554fa98.zip
Add tag timelines.
Diffstat (limited to 'test')
-rw-r--r--test/web/mastodon_api/mastodon_api_controller_test.exs15
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