summaryrefslogtreecommitdiff
path: root/test/pleroma/user_test.exs
diff options
context:
space:
mode:
authorAlex Gleason <alex@alexgleason.me>2022-01-23 15:23:56 +0000
committerAlex Gleason <alex@alexgleason.me>2022-01-23 15:23:56 +0000
commit7b87cac6cc02af82813676faf3dae22c70c288c6 (patch)
tree29d8f1b6a07bccae8ef30a6a3a9dc1607cff4f28 /test/pleroma/user_test.exs
parent9983799ccb19585ad8ed0de2546d71090b094277 (diff)
parent75c4fefb1c3a8e4ce21661cbd634c608365354ba (diff)
Merge branch 'preserve-mentions-order' into 'develop'
Preserve order of mentioned users See merge request pleroma/pleroma!3617
Diffstat (limited to 'test/pleroma/user_test.exs')
-rw-r--r--test/pleroma/user_test.exs11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/pleroma/user_test.exs b/test/pleroma/user_test.exs
index 0345a9290..a5a9021f6 100644
--- a/test/pleroma/user_test.exs
+++ b/test/pleroma/user_test.exs
@@ -2084,6 +2084,17 @@ defmodule Pleroma.UserTest do
assert user.ap_id in ap_ids
assert user_two.ap_id in ap_ids
end
+
+ test "it returns a list of AP ids in the same order" do
+ user = insert(:user)
+ user_two = insert(:user)
+ user_three = insert(:user)
+
+ ap_ids =
+ User.get_ap_ids_by_nicknames([user.nickname, user_three.nickname, user_two.nickname])
+
+ assert [user.ap_id, user_three.ap_id, user_two.ap_id] == ap_ids
+ end
end
describe "sync followers count" do