summaryrefslogtreecommitdiff
path: root/test/notification_test.exs
diff options
context:
space:
mode:
authorRoman Chvanikov <chvanikoff@gmail.com>2019-04-19 23:26:41 +0700
committerRoman Chvanikov <chvanikoff@gmail.com>2019-04-19 23:26:41 +0700
commitbc7862106d9881f858a58319e9e4b44cba1bcf01 (patch)
tree7df01ea6f09e3e4f473057637f3fd4a654448b60 /test/notification_test.exs
parent8add1194448cfc183dce01b86451422195d44023 (diff)
downloadpleroma-bc7862106d9881f858a58319e9e4b44cba1bcf01.tar.gz
pleroma-bc7862106d9881f858a58319e9e4b44cba1bcf01.zip
Fix tests
Diffstat (limited to 'test/notification_test.exs')
-rw-r--r--test/notification_test.exs27
1 files changed, 0 insertions, 27 deletions
diff --git a/test/notification_test.exs b/test/notification_test.exs
index dbc4f48f6..462398d75 100644
--- a/test/notification_test.exs
+++ b/test/notification_test.exs
@@ -6,7 +6,6 @@ defmodule Pleroma.NotificationTest do
use Pleroma.DataCase
import Pleroma.Factory
- import Mock
alias Pleroma.Notification
alias Pleroma.User
@@ -303,32 +302,6 @@ defmodule Pleroma.NotificationTest do
assert n2.seen == true
assert n3.seen == false
end
-
- test "Updates `updated_at` field" do
- user1 = insert(:user)
- user2 = insert(:user)
-
- Enum.each(0..10, fn i ->
- {:ok, _activity} =
- TwitterAPI.create_status(user1, %{
- "status" => "#{i} hi @#{user2.nickname}"
- })
- end)
-
- [notification | _] = Notification.for_user(user2)
-
- utc_now = NaiveDateTime.utc_now()
- future = NaiveDateTime.add(utc_now, 5, :second)
-
- with_mock NaiveDateTime, utc_now: fn -> future end do
- Notification.set_read_up_to(user2, notification.id)
-
- Notification.for_user(user2)
- |> Enum.each(fn notification ->
- assert notification.updated_at > notification.inserted_at
- end)
- end
- end
end
describe "for_user_since/2" do