aboutsummaryrefslogtreecommitdiff
path: root/test/tasks/database_test.exs
diff options
context:
space:
mode:
authorEgor Kislitsyn <egor@kislitsyn.com>2019-10-24 14:42:14 +0700
committerEgor Kislitsyn <egor@kislitsyn.com>2019-10-24 14:55:36 +0700
commit4c1dd55c48f80f3ebdb26d1a0c1a75b7922f578c (patch)
treef296a9b23362e59daf1eac6b669886be8dab1576 /test/tasks/database_test.exs
parent478f0883eb994c639923b7b27259a02bcef8708c (diff)
parent17c237ba808d4356bb1e202e459680563b79ef99 (diff)
downloadpleroma-4c1dd55c48f80f3ebdb26d1a0c1a75b7922f578c.tar.gz
Merge remote-tracking branch 'upstream/develop' into refactor/following-relationships
Diffstat (limited to 'test/tasks/database_test.exs')
-rw-r--r--test/tasks/database_test.exs10
1 files changed, 5 insertions, 5 deletions
diff --git a/test/tasks/database_test.exs b/test/tasks/database_test.exs
index bf5ba7883..0c7883f33 100644
--- a/test/tasks/database_test.exs
+++ b/test/tasks/database_test.exs
@@ -72,26 +72,26 @@ defmodule Mix.Tasks.Pleroma.DatabaseTest do
describe "running update_users_following_followers_counts" do
test "following and followers count are updated" do
[user, user2] = insert_pair(:user)
- {:ok, %User{info: info} = user} = User.follow(user, user2)
+ {:ok, %User{} = user} = User.follow(user, user2)
following = User.following(user)
assert length(following) == 2
- assert info.follower_count == 0
+ assert user.follower_count == 0
{:ok, user} =
user
- |> User.change_info(&Ecto.Changeset.change(&1, %{follower_count: 3}))
+ |> Ecto.Changeset.change(%{follower_count: 3})
|> Repo.update()
- assert user.info.follower_count == 3
+ assert user.follower_count == 3
assert :ok == Mix.Tasks.Pleroma.Database.run(["update_users_following_followers_counts"])
user = User.get_by_id(user.id)
assert length(User.following(user)) == 2
- assert user.info.follower_count == 0
+ assert user.follower_count == 0
end
end