projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Chats: Basic implementation.
[akkoma]
/
test
/
notification_test.exs
diff --git
a/test/notification_test.exs
b/test/notification_test.exs
index 04bf5b41aaf62883934167a3cca48978c7b658c8..b22c238613d44b8741def1e047aca6dde3ecc665 100644
(file)
--- a/
test/notification_test.exs
+++ b/
test/notification_test.exs
@@
-1,5
+1,5
@@
# Pleroma: A lightweight social networking server
# Pleroma: A lightweight social networking server
-# Copyright © 2017-20
19
Pleroma Authors <https://pleroma.social/>
+# Copyright © 2017-20
20
Pleroma Authors <https://pleroma.social/>
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.NotificationTest do
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.NotificationTest do
@@
-455,7
+455,7
@@
defmodule Pleroma.NotificationTest do
"status" => "hey @#{other_user.nickname}!"
})
"status" => "hey @#{other_user.nickname}!"
})
- {:ok, activity_two
, _} = CommonAPI.favorite(activity_one.id, third_user
)
+ {:ok, activity_two
} = CommonAPI.favorite(third_user, activity_one.id
)
assert other_user not in Notification.get_notified_from_activity(activity_two)
end
assert other_user not in Notification.get_notified_from_activity(activity_two)
end
@@
-485,7
+485,7
@@
defmodule Pleroma.NotificationTest do
assert Enum.empty?(Notification.for_user(user))
assert Enum.empty?(Notification.for_user(user))
- {:ok, _
, _} = CommonAPI.favorite(activity.id, other_user
)
+ {:ok, _
} = CommonAPI.favorite(other_user, activity.id
)
assert length(Notification.for_user(user)) == 1
assert length(Notification.for_user(user)) == 1
@@
-502,7
+502,7
@@
defmodule Pleroma.NotificationTest do
assert Enum.empty?(Notification.for_user(user))
assert Enum.empty?(Notification.for_user(user))
- {:ok, _
, _} = CommonAPI.favorite(activity.id, other_user
)
+ {:ok, _
} = CommonAPI.favorite(other_user, activity.id
)
assert length(Notification.for_user(user)) == 1
assert length(Notification.for_user(user)) == 1
@@
-557,7
+557,7
@@
defmodule Pleroma.NotificationTest do
assert Enum.empty?(Notification.for_user(user))
assert Enum.empty?(Notification.for_user(user))
- {:error,
_} = CommonAPI.favorite(activity.id, other_user
)
+ {:error,
:not_found} = CommonAPI.favorite(other_user, activity.id
)
assert Enum.empty?(Notification.for_user(user))
end
assert Enum.empty?(Notification.for_user(user))
end
@@
-667,17
+667,13
@@
defmodule Pleroma.NotificationTest do
Pleroma.Web.ActivityPub.ActivityPub.move(old_user, new_user)
ObanHelpers.perform_all()
Pleroma.Web.ActivityPub.ActivityPub.move(old_user, new_user)
ObanHelpers.perform_all()
- assert [] = Notification.for_user(follower)
-
assert [
%{
activity: %{
data: %{"type" => "Move", "actor" => ^old_ap_id, "target" => ^new_ap_id}
}
}
assert [
%{
activity: %{
data: %{"type" => "Move", "actor" => ^old_ap_id, "target" => ^new_ap_id}
}
}
- ] = Notification.for_user(follower, %{with_move: true})
-
- assert [] = Notification.for_user(other_follower)
+ ] = Notification.for_user(follower)
assert [
%{
assert [
%{
@@
-685,7
+681,7
@@
defmodule Pleroma.NotificationTest do
data: %{"type" => "Move", "actor" => ^old_ap_id, "target" => ^new_ap_id}
}
}
data: %{"type" => "Move", "actor" => ^old_ap_id, "target" => ^new_ap_id}
}
}
- ] = Notification.for_user(other_follower
, %{with_move: true}
)
+ ] = Notification.for_user(other_follower)
end
end
end
end