X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;ds=sidebyside;f=test%2Fpleroma%2Fweb%2Fpleroma_api%2Fcontrollers%2Fuser_import_controller_test.exs;h=d977bc3a22903a4104b75cb15a40770f6bed9bc6;hb=3f8fc34593414f6e35925038c38775203333b3f3;hp=68723de7141060164ac4de5893e36f1863cf6cba;hpb=4fbdd1c8a12fd2b3dc6b63ccbbaa7d4241fa778e;p=akkoma
diff --git a/test/pleroma/web/pleroma_api/controllers/user_import_controller_test.exs b/test/pleroma/web/pleroma_api/controllers/user_import_controller_test.exs
index 68723de71..d977bc3a2 100644
--- a/test/pleroma/web/pleroma_api/controllers/user_import_controller_test.exs
+++ b/test/pleroma/web/pleroma_api/controllers/user_import_controller_test.exs
@@ -1,5 +1,5 @@
# Pleroma: A lightweight social networking server
-# Copyright © 2017-2020 Pleroma Authors
+# Copyright © 2017-2021 Pleroma Authors
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Web.PleromaAPI.UserImportControllerTest do
@@ -47,7 +47,8 @@ defmodule Pleroma.Web.PleromaAPI.UserImportControllerTest do
|> json_response_and_validate_schema(200)
assert [{:ok, job_result}] = ObanHelpers.perform_all()
- assert job_result == [user2]
+ assert job_result == [refresh_record(user2)]
+ assert [%Pleroma.User{follower_count: 1}] = job_result
end
end
@@ -82,7 +83,7 @@ defmodule Pleroma.Web.PleromaAPI.UserImportControllerTest do
assert %{"error" => "Insufficient permissions: follow | write:follows."} ==
json_response(conn, 403)
else
- assert json_response(conn, 200)
+ assert json_response_and_validate_schema(conn, 200)
end
end
end
@@ -108,7 +109,7 @@ defmodule Pleroma.Web.PleromaAPI.UserImportControllerTest do
|> json_response_and_validate_schema(200)
assert [{:ok, job_result}] = ObanHelpers.perform_all()
- assert job_result == users
+ assert job_result == Enum.map(users, &refresh_record/1)
end
end