replace Repo.get_by(User, ap_id: ap_id) with User.get_by_ap_id(ap_id)

This commit is contained in:
Egor Kislitsyn 2019-04-02 17:47:52 +07:00
commit 9a59c26619
4 changed files with 6 additions and 6 deletions

View file

@ -638,8 +638,8 @@ defmodule Pleroma.Web.ActivityPub.ActivityPubTest do
describe "fetch the latest Follow" do
test "fetches the latest Follow activity" do
%Activity{data: %{"type" => "Follow"}} = activity = insert(:follow_activity)
follower = Repo.get_by(User, ap_id: activity.data["actor"])
followed = Repo.get_by(User, ap_id: activity.data["object"])
follower = User.get_by_ap_id(activity.data["actor"])
followed = User.get_by_ap_id(activity.data["object"])
assert activity == Utils.fetch_latest_follow(follower, followed)
end