aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorlain <lain@soykaf.club>2018-11-03 11:41:40 +0100
committerlain <lain@soykaf.club>2018-11-03 11:41:40 +0100
commit7dfe611620fbcc45411345ee3e5c5cf7fb169f76 (patch)
tree8b1c74003d2ada6ecf46d2b279ce8d947d8bbe7f /test
parent4bcdbb12a40049ca4504602ffcf3e1e95455706b (diff)
downloadpleroma-7dfe611620fbcc45411345ee3e5c5cf7fb169f76.tar.gz
Test for case-insensitive mastodon hashtag timelines.
Diffstat (limited to 'test')
-rw-r--r--test/web/mastodon_api/mastodon_api_controller_test.exs13
1 files 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
index 938d556c7..3f9324fcc 100644
--- 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)