projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add include for the "Further reading" section
[akkoma]
/
test
/
user_test.exs
diff --git
a/test/user_test.exs
b/test/user_test.exs
index 3556ef1b4de5ecc17e149bd669d801071b49ed95..98c79da4f642f7717e8ae12a08d5f27c98cb3b32 100644
(file)
--- a/
test/user_test.exs
+++ b/
test/user_test.exs
@@
-1122,7
+1122,7
@@
defmodule Pleroma.UserTest do
assert [%{activity | thread_muted?: CommonAPI.thread_muted?(user2, activity)}] ==
ActivityPub.fetch_activities([user2.ap_id | User.following(user2)], %{
assert [%{activity | thread_muted?: CommonAPI.thread_muted?(user2, activity)}] ==
ActivityPub.fetch_activities([user2.ap_id | User.following(user2)], %{
-
"user" =>
user2
+
user:
user2
})
{:ok, _user} = User.deactivate(user)
})
{:ok, _user} = User.deactivate(user)
@@
-1132,7
+1132,7
@@
defmodule Pleroma.UserTest do
assert [] ==
ActivityPub.fetch_activities([user2.ap_id | User.following(user2)], %{
assert [] ==
ActivityPub.fetch_activities([user2.ap_id | User.following(user2)], %{
-
"user" =>
user2
+
user:
user2
})
end
end
})
end
end
@@
-1159,6
+1159,9
@@
defmodule Pleroma.UserTest do
follower = insert(:user)
{:ok, follower} = User.follow(follower, user)
follower = insert(:user)
{:ok, follower} = User.follow(follower, user)
+ locked_user = insert(:user, name: "locked", locked: true)
+ {:ok, _} = User.follow(user, locked_user, :follow_pending)
+
object = insert(:note, user: user)
activity = insert(:note_activity, user: user, note: object)
object = insert(:note, user: user)
activity = insert(:note_activity, user: user, note: object)
@@
-1177,6
+1180,8
@@
defmodule Pleroma.UserTest do
refute User.following?(follower, user)
assert %{deactivated: true} = User.get_by_id(user.id)
refute User.following?(follower, user)
assert %{deactivated: true} = User.get_by_id(user.id)
+ assert [] == User.get_follow_requests(locked_user)
+
user_activities =
user.ap_id
|> Activity.Queries.by_actor()
user_activities =
user.ap_id
|> Activity.Queries.by_actor()
@@
-1802,7
+1807,7
@@
defmodule Pleroma.UserTest do
user = insert(:user)
assert User.avatar_url(user) =~ "/images/avi.png"
user = insert(:user)
assert User.avatar_url(user) =~ "/images/avi.png"
-
Pleroma.Config.put
([:assets, :default_user_avatar], "avatar.png")
+
clear_config
([:assets, :default_user_avatar], "avatar.png")
user = User.get_cached_by_nickname_or_id(user.nickname)
assert User.avatar_url(user) =~ "avatar.png"
user = User.get_cached_by_nickname_or_id(user.nickname)
assert User.avatar_url(user) =~ "avatar.png"