From: lain Date: Sat, 3 Nov 2018 10:41:40 +0000 (+0100) Subject: Test for case-insensitive mastodon hashtag timelines. X-Git-Url: http://git.squeep.com/?a=commitdiff_plain;ds=sidebyside;h=7dfe611620fbcc45411345ee3e5c5cf7fb169f76;hp=4bcdbb12a40049ca4504602ffcf3e1e95455706b;p=akkoma Test for case-insensitive mastodon hashtag timelines. --- 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)