projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'add-admin-to-node-info' into 'develop'
[akkoma]
/
test
/
notification_test.exs
diff --git
a/test/notification_test.exs
b/test/notification_test.exs
index d36a92a7c8887eeb1e55ef6d805e5fbf398f4737..755874a3da9ee9846c265821bca0cf3e63513c9c 100644
(file)
--- a/
test/notification_test.exs
+++ b/
test/notification_test.exs
@@
-300,7
+300,7
@@
defmodule Pleroma.NotificationTest do
{:ok, activity} = CommonAPI.post(user, %{"status" => "test post"})
{:ok, activity} = CommonAPI.post(user, %{"status" => "test post"})
- assert
length(Notification.for_user(user)) == 0
+ assert
Enum.empty?(Notification.for_user(user))
{:ok, _, _} = CommonAPI.favorite(activity.id, other_user)
{:ok, _, _} = CommonAPI.favorite(activity.id, other_user)
@@
-308,7
+308,7
@@
defmodule Pleroma.NotificationTest do
{:ok, _} = CommonAPI.delete(activity.id, user)
{:ok, _} = CommonAPI.delete(activity.id, user)
- assert
length(Notification.for_user(user)) == 0
+ assert
Enum.empty?(Notification.for_user(user))
end
test "liking an activity results in 1 notification, then 0 if the activity is unliked" do
end
test "liking an activity results in 1 notification, then 0 if the activity is unliked" do
@@
-317,7
+317,7
@@
defmodule Pleroma.NotificationTest do
{:ok, activity} = CommonAPI.post(user, %{"status" => "test post"})
{:ok, activity} = CommonAPI.post(user, %{"status" => "test post"})
- assert
length(Notification.for_user(user)) == 0
+ assert
Enum.empty?(Notification.for_user(user))
{:ok, _, _} = CommonAPI.favorite(activity.id, other_user)
{:ok, _, _} = CommonAPI.favorite(activity.id, other_user)
@@
-325,7
+325,7
@@
defmodule Pleroma.NotificationTest do
{:ok, _, _, _} = CommonAPI.unfavorite(activity.id, other_user)
{:ok, _, _, _} = CommonAPI.unfavorite(activity.id, other_user)
- assert
length(Notification.for_user(user)) == 0
+ assert
Enum.empty?(Notification.for_user(user))
end
test "repeating an activity results in 1 notification, then 0 if the activity is deleted" do
end
test "repeating an activity results in 1 notification, then 0 if the activity is deleted" do
@@
-334,7
+334,7
@@
defmodule Pleroma.NotificationTest do
{:ok, activity} = CommonAPI.post(user, %{"status" => "test post"})
{:ok, activity} = CommonAPI.post(user, %{"status" => "test post"})
- assert
length(Notification.for_user(user)) == 0
+ assert
Enum.empty?(Notification.for_user(user))
{:ok, _, _} = CommonAPI.repeat(activity.id, other_user)
{:ok, _, _} = CommonAPI.repeat(activity.id, other_user)
@@
-342,7
+342,7
@@
defmodule Pleroma.NotificationTest do
{:ok, _} = CommonAPI.delete(activity.id, user)
{:ok, _} = CommonAPI.delete(activity.id, user)
- assert
length(Notification.for_user(user)) == 0
+ assert
Enum.empty?(Notification.for_user(user))
end
test "repeating an activity results in 1 notification, then 0 if the activity is unrepeated" do
end
test "repeating an activity results in 1 notification, then 0 if the activity is unrepeated" do
@@
-351,7
+351,7
@@
defmodule Pleroma.NotificationTest do
{:ok, activity} = CommonAPI.post(user, %{"status" => "test post"})
{:ok, activity} = CommonAPI.post(user, %{"status" => "test post"})
- assert
length(Notification.for_user(user)) == 0
+ assert
Enum.empty?(Notification.for_user(user))
{:ok, _, _} = CommonAPI.repeat(activity.id, other_user)
{:ok, _, _} = CommonAPI.repeat(activity.id, other_user)
@@
-359,7
+359,7
@@
defmodule Pleroma.NotificationTest do
{:ok, _, _} = CommonAPI.unrepeat(activity.id, other_user)
{:ok, _, _} = CommonAPI.unrepeat(activity.id, other_user)
- assert
length(Notification.for_user(user)) == 0
+ assert
Enum.empty?(Notification.for_user(user))
end
test "liking an activity which is already deleted does not generate a notification" do
end
test "liking an activity which is already deleted does not generate a notification" do
@@
-368,15
+368,15
@@
defmodule Pleroma.NotificationTest do
{:ok, activity} = CommonAPI.post(user, %{"status" => "test post"})
{:ok, activity} = CommonAPI.post(user, %{"status" => "test post"})
- assert
length(Notification.for_user(user)) == 0
+ assert
Enum.empty?(Notification.for_user(user))
{:ok, _deletion_activity} = CommonAPI.delete(activity.id, user)
{:ok, _deletion_activity} = CommonAPI.delete(activity.id, user)
- assert
length(Notification.for_user(user)) == 0
+ assert
Enum.empty?(Notification.for_user(user))
{:error, _} = CommonAPI.favorite(activity.id, other_user)
{:error, _} = CommonAPI.favorite(activity.id, other_user)
- assert
length(Notification.for_user(user)) == 0
+ assert
Enum.empty?(Notification.for_user(user))
end
test "repeating an activity which is already deleted does not generate a notification" do
end
test "repeating an activity which is already deleted does not generate a notification" do
@@
-385,15
+385,15
@@
defmodule Pleroma.NotificationTest do
{:ok, activity} = CommonAPI.post(user, %{"status" => "test post"})
{:ok, activity} = CommonAPI.post(user, %{"status" => "test post"})
- assert
length(Notification.for_user(user)) == 0
+ assert
Enum.empty?(Notification.for_user(user))
{:ok, _deletion_activity} = CommonAPI.delete(activity.id, user)
{:ok, _deletion_activity} = CommonAPI.delete(activity.id, user)
- assert
length(Notification.for_user(user)) == 0
+ assert
Enum.empty?(Notification.for_user(user))
{:error, _} = CommonAPI.repeat(activity.id, other_user)
{:error, _} = CommonAPI.repeat(activity.id, other_user)
- assert
length(Notification.for_user(user)) == 0
+ assert
Enum.empty?(Notification.for_user(user))
end
test "replying to a deleted post without tagging does not generate a notification" do
end
test "replying to a deleted post without tagging does not generate a notification" do
@@
-409,7
+409,7
@@
defmodule Pleroma.NotificationTest do
"in_reply_to_status_id" => activity.id
})
"in_reply_to_status_id" => activity.id
})
- assert
length(Notification.for_user(user)) == 0
+ assert
Enum.empty?(Notification.for_user(user))
end
end
end
end
end
end