diff options
author | lambda <pleromagit@rogerbraun.net> | 2018-11-03 12:40:42 +0000 |
---|---|---|
committer | lambda <pleromagit@rogerbraun.net> | 2018-11-03 12:40:42 +0000 |
commit | cf6ed32c683139660a6cc645b565072c24993cef (patch) | |
tree | 8b1c74003d2ada6ecf46d2b279ce8d947d8bbe7f | |
parent | 4bcdbb12a40049ca4504602ffcf3e1e95455706b (diff) | |
parent | 7dfe611620fbcc45411345ee3e5c5cf7fb169f76 (diff) | |
download | pleroma-cf6ed32c683139660a6cc645b565072c24993cef.tar.gz pleroma-cf6ed32c683139660a6cc645b565072c24993cef.zip |
Merge branch 'hashtag-search-case-sensitivity-test' into 'develop'
Test for case-insensitive mastodon hashtag timelines.
See merge request pleroma/pleroma!419
-rw-r--r-- | test/web/mastodon_api/mastodon_api_controller_test.exs | 13 |
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) |