X-Git-Url: https://git.squeep.com/?a=blobdiff_plain;ds=sidebyside;f=test%2Ftasks%2Fuser_test.exs;h=8df835b56d6dba14f2076bdcd949dcde417a5868;hb=736fead494f6140871919308e872bb6fe5b7a196;hp=f024f92ae8c5ed2fdaa541bf5b845d25e9382985;hpb=8cc809e44e3a899f93061c4c5f68d9736d79d79e;p=akkoma
diff --git a/test/tasks/user_test.exs b/test/tasks/user_test.exs
index f024f92ae..8df835b56 100644
--- a/test/tasks/user_test.exs
+++ b/test/tasks/user_test.exs
@@ -1,5 +1,5 @@
# Pleroma: A lightweight social networking server
-# Copyright © 2017-2019 Pleroma Authors
+# Copyright © 2017-2020 Pleroma Authors
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Mix.Tasks.Pleroma.UserTest do
@@ -139,7 +139,8 @@ defmodule Mix.Tasks.Pleroma.UserTest do
describe "running unsubscribe" do
test "user is unsubscribed" do
followed = insert(:user)
- user = insert(:user, %{following: [User.ap_followers(followed)]})
+ user = insert(:user)
+ User.follow(user, followed, :follow_accept)
Mix.Tasks.Pleroma.User.run(["unsubscribe", user.nickname])
@@ -154,7 +155,7 @@ defmodule Mix.Tasks.Pleroma.UserTest do
assert message =~ "Successfully unsubscribed"
user = User.get_cached_by_nickname(user.nickname)
- assert Enum.empty?(user.following)
+ assert Enum.empty?(User.get_friends(user))
assert user.deactivated
end