projects
/
akkoma
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4bcdbb1
)
Test for case-insensitive mastodon hashtag timelines.
author
lain
<lain@soykaf.club>
Sat, 3 Nov 2018 10:41:40 +0000
(11:41 +0100)
committer
lain
<lain@soykaf.club>
Sat, 3 Nov 2018 10:41:40 +0000
(11:41 +0100)
test/web/mastodon_api/mastodon_api_controller_test.exs
patch
|
blob
|
history
diff --git
a/test/web/mastodon_api/mastodon_api_controller_test.exs
b/test/web/mastodon_api/mastodon_api_controller_test.exs
index 938d556c762d4e9f2bc98026fc3f91ee820eb38f..3f9324fccc76f4fad1bf74d257b974feca714c29 100644
(file)
--- 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 =
+
n
conn =
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)