commit: cf6ed32c683139660a6cc645b565072c24993cef
parent: 4bcdbb12a40049ca4504602ffcf3e1e95455706b
Author: lambda <pleromagit@rogerbraun.net>
Date: Sat, 3 Nov 2018 12:40:42 +0000
Merge branch 'hashtag-search-case-sensitivity-test' into 'develop'
Test for case-insensitive mastodon hashtag timelines.
See merge request pleroma/pleroma!419
Diffstat:
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/test/web/mastodon_api/mastodon_api_controller_test.exs b/test/web/mastodon_api/mastodon_api_controller_test.exs
@@ -944,11 +944,20 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIControllerTest do
{:ok, [_activity]} =
OStatus.fetch_activity_from_url("https://shitposter.club/notice/2827873")
- conn =
+ nconn =
conn
|> get("/api/v1/timelines/tag/2hu")
- assert [%{"id" => id}] = json_response(conn, 200)
+ assert [%{"id" => id}] = json_response(nconn, 200)
+
+ assert id == to_string(activity.id)
+
+ # works for different capitalization too
+ nconn =
+ conn
+ |> get("/api/v1/timelines/tag/2HU")
+
+ assert [%{"id" => id}] = json_response(nconn, 200)
assert id == to_string(activity.id)
end)