projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
HTTP Security plug: rewrite &csp_string/0
[akkoma]
/
test
/
notification_test.exs
diff --git
a/test/notification_test.exs
b/test/notification_test.exs
index 3a96721faa86de16cc9ffbcfd74e876688a5768c..37c255fee5130e96f3d10a4f07f1b7243f3330e2 100644
(file)
--- a/
test/notification_test.exs
+++ b/
test/notification_test.exs
@@
-454,8
+454,7
@@
defmodule Pleroma.NotificationTest do
status: "hey again @#{other_user.nickname}!"
})
status: "hey again @#{other_user.nickname}!"
})
- [n2, n1] = notifs = Notification.for_user(other_user)
- assert length(notifs) == 2
+ [n2, n1] = Notification.for_user(other_user)
assert n2.id > n1.id
assert n2.id > n1.id
@@
-464,7
+463,9
@@
defmodule Pleroma.NotificationTest do
status: "hey yet again @#{other_user.nickname}!"
})
status: "hey yet again @#{other_user.nickname}!"
})
- Notification.set_read_up_to(other_user, n2.id)
+ [_, read_notification] = Notification.set_read_up_to(other_user, n2.id)
+
+ assert read_notification.activity.object
[n3, n2, n1] = Notification.for_user(other_user)
[n3, n2, n1] = Notification.for_user(other_user)
@@
-972,7
+973,9
@@
defmodule Pleroma.NotificationTest do
{:ok, _activity} = CommonAPI.post(muted, %{status: "hey @#{user.nickname}"})
{:ok, _activity} = CommonAPI.post(muted, %{status: "hey @#{user.nickname}"})
- assert length(Notification.for_user(user)) == 1
+ [notification] = Notification.for_user(user)
+
+ assert notification.activity.object
end
test "it doesn't return notifications for muted user with notifications" do
end
test "it doesn't return notifications for muted user with notifications" do