projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add basic channel state.
[akkoma]
/
test
/
user_test.exs
diff --git
a/test/user_test.exs
b/test/user_test.exs
index e9f7a866684b4a6d3e82b58d74db5822eff7ba5c..31c5962e2d0f4023e2922f0d58c34d302d523a44 100644
(file)
--- a/
test/user_test.exs
+++ b/
test/user_test.exs
@@
-36,7
+36,7
@@
defmodule Pleroma.UserTest do
followed = User.get_by_ap_id(followed.ap_id)
assert followed.info["follower_count"] == 1
followed = User.get_by_ap_id(followed.ap_id)
assert followed.info["follower_count"] == 1
- assert
user.following == [User.ap_followers(followed)]
+ assert
User.ap_followers(followed) in user.following
end
test "following a remote user will ensure a websub subscription is present" do
end
test "following a remote user will ensure a websub subscription is present" do
@@
-46,7
+46,7
@@
defmodule Pleroma.UserTest do
assert followed.local == false
{:ok, user} = User.follow(user, followed)
assert followed.local == false
{:ok, user} = User.follow(user, followed)
- assert
user.following == [User.ap_followers(followed)]
+ assert
User.ap_followers(followed) in user.following
query = from w in WebsubClientSubscription,
where: w.topic == ^followed.info["topic"]
query = from w in WebsubClientSubscription,
where: w.topic == ^followed.info["topic"]
@@
-71,6
+71,7
@@
defmodule Pleroma.UserTest do
{:error, _} = User.unfollow(user, user)
{:error, _} = User.unfollow(user, user)
+ user = Repo.get(User, user.id)
assert user.following == [user.ap_id]
end
assert user.following == [user.ap_id]
end
@@
-318,6
+319,7
@@
defmodule Pleroma.UserTest do
assert [addressed] == User.get_recipients_from_activity(activity)
{:ok, user} = User.follow(user, actor)
assert [addressed] == User.get_recipients_from_activity(activity)
{:ok, user} = User.follow(user, actor)
+ {:ok, user_two} = User.follow(user_two, actor)
recipients = User.get_recipients_from_activity(activity)
assert length(recipients) == 2
assert user in recipients
recipients = User.get_recipients_from_activity(activity)
assert length(recipients) == 2
assert user in recipients