summaryrefslogtreecommitdiff
path: root/test/web/mastodon_api/search_controller_test.exs
diff options
context:
space:
mode:
authorlain <lain@soykaf.club>2019-08-08 16:04:20 +0200
committerlain <lain@soykaf.club>2019-08-08 16:04:20 +0200
commita2b98f6d58218c5806247743aa0a2a600c9959ab (patch)
tree49914ac1e30561e1180651ad6b0fef5d96ecfb5c /test/web/mastodon_api/search_controller_test.exs
parente4a01d253ef7ab09d028198e5e39b9aba357486c (diff)
parentb18234e04c76daa564e0d8157dcd09566485da24 (diff)
downloadpleroma-a2b98f6d58218c5806247743aa0a2a600c9959ab.tar.gz
pleroma-a2b98f6d58218c5806247743aa0a2a600c9959ab.zip
Merge remote-tracking branch 'origin/develop' into pleroma-conversations
Diffstat (limited to 'test/web/mastodon_api/search_controller_test.exs')
-rw-r--r--test/web/mastodon_api/search_controller_test.exs12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/web/mastodon_api/search_controller_test.exs b/test/web/mastodon_api/search_controller_test.exs
index 043b96c14..49c79ff0a 100644
--- a/test/web/mastodon_api/search_controller_test.exs
+++ b/test/web/mastodon_api/search_controller_test.exs
@@ -95,6 +95,18 @@ defmodule Pleroma.Web.MastodonAPI.SearchControllerTest do
assert user_three.nickname in result_ids
end
+
+ test "returns account if query contains a space", %{conn: conn} do
+ user = insert(:user, %{nickname: "shp@shitposter.club"})
+
+ results =
+ conn
+ |> assign(:user, user)
+ |> get("/api/v1/accounts/search", %{"q" => "shp@shitposter.club xxx "})
+ |> json_response(200)
+
+ assert length(results) == 1
+ end
end
describe ".search" do