X-Git-Url: https://git.squeep.com/?a=blobdiff_plain;f=test%2Ftasks%2Fcount_statuses_test.exs;h=73c2ea6906d3ed31063e76523f9a0dce0d5a0475;hb=f5bda09de648a6de3151c8614005ebc70447facb;hp=6035da3c31b41988800b1567220f5491b52f20c0;hpb=d7f9679ff2c9c4bd2b9967d7a32b5a4fe145305e;p=akkoma
diff --git a/test/tasks/count_statuses_test.exs b/test/tasks/count_statuses_test.exs
index 6035da3c3..73c2ea690 100644
--- a/test/tasks/count_statuses_test.exs
+++ b/test/tasks/count_statuses_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.CountStatusesTest do
@@ -22,18 +22,18 @@ defmodule Mix.Tasks.Pleroma.CountStatusesTest do
user = refresh_record(user)
user2 = refresh_record(user2)
- assert %{info: %{note_count: 2}} = user
- assert %{info: %{note_count: 1}} = user2
+ assert %{note_count: 2} = user
+ assert %{note_count: 1} = user2
- {:ok, user} = User.update_info(user, &User.Info.set_note_count(&1, 0))
- {:ok, user2} = User.update_info(user2, &User.Info.set_note_count(&1, 0))
+ {:ok, user} = User.update_note_count(user, 0)
+ {:ok, user2} = User.update_note_count(user2, 0)
- assert %{info: %{note_count: 0}} = user
- assert %{info: %{note_count: 0}} = user2
+ assert %{note_count: 0} = user
+ assert %{note_count: 0} = user2
assert capture_io(fn -> Mix.Tasks.Pleroma.CountStatuses.run([]) end) == "Done\n"
- assert %{info: %{note_count: 2}} = refresh_record(user)
- assert %{info: %{note_count: 1}} = refresh_record(user2)
+ assert %{note_count: 2} = refresh_record(user)
+ assert %{note_count: 1} = refresh_record(user2)
end
end