summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlain <lain@soykaf.club>2019-10-11 12:41:44 +0200
committerlain <lain@soykaf.club>2019-10-11 12:41:44 +0200
commitcb8492962e2a765090dbce82b8fc9f000d49bfa1 (patch)
tree9d02ef2aa2d57fbb5adf1e797a942f1bb5c7e9b1
parent37812740c4c03f0a79d17ff186db644a60414ff7 (diff)
downloadpleroma-cb8492962e2a765090dbce82b8fc9f000d49bfa1.tar.gz
pleroma-cb8492962e2a765090dbce82b8fc9f000d49bfa1.zip
SearchController: Fix test.
Turns out you can't actually find the user with this.
-rw-r--r--test/web/mastodon_api/controllers/search_controller_test.exs8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/web/mastodon_api/controllers/search_controller_test.exs b/test/web/mastodon_api/controllers/search_controller_test.exs
index 0ca896e01..ee413eef7 100644
--- a/test/web/mastodon_api/controllers/search_controller_test.exs
+++ b/test/web/mastodon_api/controllers/search_controller_test.exs
@@ -40,9 +40,9 @@ defmodule Pleroma.Web.MastodonAPI.SearchControllerTest do
test "search", %{conn: conn} do
user = insert(:user)
user_two = insert(:user, %{nickname: "shp@shitposter.club"})
- user_three = insert(:user, %{nickname: "shp@heldscal.la", name: "I love 2hu 天子"})
+ user_three = insert(:user, %{nickname: "shp@heldscal.la", name: "I love 2hu"})
- {:ok, activity} = CommonAPI.post(user, %{"status" => "This is about 2hu private"})
+ {:ok, activity} = CommonAPI.post(user, %{"status" => "This is about 2hu private 天子"})
{:ok, _activity} =
CommonAPI.post(user, %{
@@ -70,8 +70,8 @@ defmodule Pleroma.Web.MastodonAPI.SearchControllerTest do
get(conn, "/api/v2/search", %{"q" => "天子"})
|> json_response(200)
- [account] == results["accounts"]
- assert account["id"] == to_string(user_three.id)
+ [status] = results["statuses"]
+ assert status["id"] == to_string(activity.id)
end
end