summaryrefslogtreecommitdiff
path: root/test/web/mastodon_api/controllers/search_controller_test.exs
diff options
context:
space:
mode:
authorMark Felder <feld@FreeBSD.org>2020-06-11 10:25:00 -0500
committerMark Felder <feld@FreeBSD.org>2020-06-11 10:25:00 -0500
commit8a59fde0e57afebfc07c147d070e66bf9c8db6a9 (patch)
tree7a2f194d5f0afabaed1f1cc5adda7c2078336979 /test/web/mastodon_api/controllers/search_controller_test.exs
parent99afc7f4e423997079aaee1287b9ffb28a851d8b (diff)
parent5d6ec6e5fc9b00d367568dd111816b90cddad02b (diff)
downloadpleroma-8a59fde0e57afebfc07c147d070e66bf9c8db6a9.tar.gz
pleroma-8a59fde0e57afebfc07c147d070e66bf9c8db6a9.zip
Merge branch 'develop' into fix/csp-mediaproxy-base-url
Diffstat (limited to 'test/web/mastodon_api/controllers/search_controller_test.exs')
-rw-r--r--test/web/mastodon_api/controllers/search_controller_test.exs9
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