diff options
author | Maksim Pechnikov <parallel588@gmail.com> | 2020-06-15 15:24:55 +0300 |
---|---|---|
committer | Maksim Pechnikov <parallel588@gmail.com> | 2020-06-15 15:24:55 +0300 |
commit | 579763126f52b21733e84594f36b86e270b3005d (patch) | |
tree | 2b183b4b4ac4be2a4b64da87adc7ed56b7222f39 /test/web/mastodon_api/controllers/search_controller_test.exs | |
parent | efdfc85c2d8e5118c1aa18e4f04026ec90cd11d2 (diff) | |
parent | 448e93ce2c1eab9eb91118b90f661c31056e4781 (diff) | |
download | pleroma-579763126f52b21733e84594f36b86e270b3005d.tar.gz pleroma-579763126f52b21733e84594f36b86e270b3005d.zip |
Merge branch 'develop' into issue/1855
Diffstat (limited to 'test/web/mastodon_api/controllers/search_controller_test.exs')
-rw-r--r-- | test/web/mastodon_api/controllers/search_controller_test.exs | 29 |
1 files changed, 29 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 0e025adca..c605957b1 100644 --- a/test/web/mastodon_api/controllers/search_controller_test.exs +++ b/test/web/mastodon_api/controllers/search_controller_test.exs @@ -120,6 +120,35 @@ defmodule Pleroma.Web.MastodonAPI.SearchControllerTest do assert results["hashtags"] == [ %{"name" => "shpuld", "url" => "#{Web.base_url()}/tag/shpuld"} ] + + results = + conn + |> get( + "/api/v2/search?#{ + URI.encode_query(%{ + q: + "https://www.washingtonpost.com/sports/2020/06/10/" <> + "nascar-ban-display-confederate-flag-all-events-properties/" + }) + }" + ) + |> json_response_and_validate_schema(200) + + assert results["hashtags"] == [ + %{"name" => "nascar", "url" => "#{Web.base_url()}/tag/nascar"}, + %{"name" => "ban", "url" => "#{Web.base_url()}/tag/ban"}, + %{"name" => "display", "url" => "#{Web.base_url()}/tag/display"}, + %{"name" => "confederate", "url" => "#{Web.base_url()}/tag/confederate"}, + %{"name" => "flag", "url" => "#{Web.base_url()}/tag/flag"}, + %{"name" => "all", "url" => "#{Web.base_url()}/tag/all"}, + %{"name" => "events", "url" => "#{Web.base_url()}/tag/events"}, + %{"name" => "properties", "url" => "#{Web.base_url()}/tag/properties"}, + %{ + "name" => "NascarBanDisplayConfederateFlagAllEventsProperties", + "url" => + "#{Web.base_url()}/tag/NascarBanDisplayConfederateFlagAllEventsProperties" + } + ] end test "excludes a blocked users from search results", %{conn: conn} do |