Use User.get_cached* everywhere
This commit is contained in:
parent
05862ded7a
commit
b9cdf6d3b9
42 changed files with 255 additions and 229 deletions
|
|
@ -30,7 +30,7 @@ defmodule Pleroma.Web.OStatusTest do
|
|||
{:ok, [activity]} = OStatus.handle_incoming(incoming)
|
||||
object = Object.normalize(activity.data["object"])
|
||||
|
||||
user = User.get_by_ap_id(activity.data["actor"])
|
||||
user = User.get_cached_by_ap_id(activity.data["actor"])
|
||||
assert user.info.note_count == 1
|
||||
assert activity.data["type"] == "Create"
|
||||
assert object.data["type"] == "Note"
|
||||
|
|
@ -296,8 +296,8 @@ defmodule Pleroma.Web.OStatusTest do
|
|||
assert activity.data["object"] == "https://pawoo.net/users/pekorino"
|
||||
refute activity.local
|
||||
|
||||
follower = User.get_by_ap_id(activity.data["actor"])
|
||||
followed = User.get_by_ap_id(activity.data["object"])
|
||||
follower = User.get_cached_by_ap_id(activity.data["actor"])
|
||||
followed = User.get_cached_by_ap_id(activity.data["object"])
|
||||
|
||||
assert User.following?(follower, followed)
|
||||
end
|
||||
|
|
@ -320,8 +320,8 @@ defmodule Pleroma.Web.OStatusTest do
|
|||
assert activity.data["object"]["object"] == "https://pawoo.net/users/pekorino"
|
||||
refute activity.local
|
||||
|
||||
follower = User.get_by_ap_id(activity.data["actor"])
|
||||
followed = User.get_by_ap_id(activity.data["object"]["object"])
|
||||
follower = User.get_cached_by_ap_id(activity.data["actor"])
|
||||
followed = User.get_cached_by_ap_id(activity.data["object"]["object"])
|
||||
|
||||
refute User.following?(follower, followed)
|
||||
end
|
||||
|
|
@ -355,7 +355,7 @@ defmodule Pleroma.Web.OStatusTest do
|
|||
|
||||
{:ok, user} = OStatus.find_or_make_user(uri)
|
||||
|
||||
user = Pleroma.User.get_by_id(user.id)
|
||||
user = Pleroma.User.get_cached_by_id(user.id)
|
||||
assert user.name == "Constance Variable"
|
||||
assert user.nickname == "lambadalambda@social.heldscal.la"
|
||||
assert user.local == false
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue