X-Git-Url: https://git.squeep.com/?a=blobdiff_plain;ds=sidebyside;f=test%2Fmarker_test.exs;h=c80ae16b60c9a6ee55c4b46f524d8623e2097398;hb=3370bb0e46413d35810b8d2740cc3e92646d6324;hp=54c7106915eb4a4eb0888ea9bb4599384e116f7f;hpb=da44ee5b0f6207666442b956ab2cdef3e5e9b49b;p=akkoma
diff --git a/test/marker_test.exs b/test/marker_test.exs
index 54c710691..c80ae16b6 100644
--- a/test/marker_test.exs
+++ b/test/marker_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 Pleroma.MarkerTest do
@@ -8,39 +8,12 @@ defmodule Pleroma.MarkerTest do
import Pleroma.Factory
- describe "multi_set_unread_count/3" do
- test "returns multi" do
- user = insert(:user)
-
- assert %Ecto.Multi{
- operations: [marker: {:run, _}, counters: {:run, _}]
- } =
- Marker.multi_set_last_read_id(
- Ecto.Multi.new(),
- user,
- "notifications"
- )
- end
-
- test "return empty multi" do
- user = insert(:user)
- multi = Ecto.Multi.new()
- assert Marker.multi_set_last_read_id(multi, user, "home") == multi
- end
- end
-
describe "get_markers/2" do
test "returns user markers" do
user = insert(:user)
marker = insert(:marker, user: user)
- insert(:notification, user: user)
- insert(:notification, user: user)
insert(:marker, timeline: "home", user: user)
-
- assert Marker.get_markers(
- user,
- ["notifications"]
- ) == [%Marker{refresh_record(marker) | unread_count: 2}]
+ assert Marker.get_markers(user, ["notifications"]) == [refresh_record(marker)]
end
end