aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorkaniini <ariadne@dereferenced.org>2019-08-03 18:13:21 +0000
committerkaniini <ariadne@dereferenced.org>2019-08-03 18:13:21 +0000
commit99ce6d6044606f8a91cb101c7f08a493a6644ee8 (patch)
treedd0384e3ba1d7f06d5476ac265bf482a60ef1a5a /test
parent7319b41e340ac17ed7f31f89cd0edc959de270ce (diff)
parent040347b24820e2773c45a38d4cb6a184d6b14366 (diff)
downloadpleroma-99ce6d6044606f8a91cb101c7f08a493a6644ee8.tar.gz
Merge branch 'fix/search-space-error' into 'develop'
Remove spaces from the domain search Closes #1154 See merge request pleroma/pleroma!1521
Diffstat (limited to 'test')
-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