Remove spaces from the domain search

This commit is contained in:
Sergey Suprunenko 2019-08-03 18:13:20 +00:00 committed by kaniini
commit 040347b248
2 changed files with 13 additions and 1 deletions

View file

@ -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