diff options
author | Ivan Tashkinov <ivantashkinov@gmail.com> | 2020-06-11 16:05:14 +0300 |
---|---|---|
committer | Ivan Tashkinov <ivantashkinov@gmail.com> | 2020-06-11 16:05:14 +0300 |
commit | b28cec4271c52d55f6e6cf8a1bcdb41efec3ef03 (patch) | |
tree | babf4d13ab2bfde56c17d7e1a8c6d7e690a58de3 /test | |
parent | 7aa6c82937090ca6f2298dee0ef894954ca2f129 (diff) | |
download | pleroma-b28cec4271c52d55f6e6cf8a1bcdb41efec3ef03.tar.gz pleroma-b28cec4271c52d55f6e6cf8a1bcdb41efec3ef03.zip |
[#1794] Fixes URI query handling for hashtags extraction in search.
Diffstat (limited to 'test')
-rw-r--r-- | test/web/mastodon_api/controllers/search_controller_test.exs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/web/mastodon_api/controllers/search_controller_test.exs b/test/web/mastodon_api/controllers/search_controller_test.exs index 84d46895e..0e025adca 100644 --- a/test/web/mastodon_api/controllers/search_controller_test.exs +++ b/test/web/mastodon_api/controllers/search_controller_test.exs @@ -111,6 +111,15 @@ defmodule Pleroma.Web.MastodonAPI.SearchControllerTest do %{"name" => "prone", "url" => "#{Web.base_url()}/tag/prone"}, %{"name" => "AccidentProne", "url" => "#{Web.base_url()}/tag/AccidentProne"} ] + + results = + conn + |> get("/api/v2/search?#{URI.encode_query(%{q: "https://shpposter.club/users/shpuld"})}") + |> json_response_and_validate_schema(200) + + assert results["hashtags"] == [ + %{"name" => "shpuld", "url" => "#{Web.base_url()}/tag/shpuld"} + ] end test "excludes a blocked users from search results", %{conn: conn} do |