Also remove Repo functions in the tests
authorMark Felder <feld@FreeBSD.org>
Fri, 5 Apr 2019 16:59:56 +0000 (11:59 -0500)
committerMark Felder <feld@FreeBSD.org>
Fri, 5 Apr 2019 16:59:56 +0000 (11:59 -0500)
test/web/admin_api/admin_api_controller_test.exs

index cedc907ec0ceda08d7f4f5746ed99dce7e551b7d..9c1cae6b76a4a0e396e34662fc2f7768d1430e4a 100644 (file)
@@ -89,8 +89,8 @@ defmodule Pleroma.Web.AdminAPI.AdminAPIControllerTest do
           "followed" => user.nickname
         })
 
-      user = Repo.get(User, user.id)
-      follower = Repo.get(User, follower.id)
+      user = User.get_by_nickname(user.id)
+      follower = User.get_by_nickname(follower.id)
 
       assert User.following?(follower, user)
     end
@@ -113,8 +113,8 @@ defmodule Pleroma.Web.AdminAPI.AdminAPIControllerTest do
           "followed" => user.nickname
         })
 
-      user = Repo.get(User, user.id)
-      follower = Repo.get(User, follower.id)
+      user = User.get_by_nickname(user.id)
+      follower = User.get_by_nickname(follower.id)
 
       refute User.following?(follower, user)
     end