summaryrefslogtreecommitdiff
path: root/test/pagination_test.exs
diff options
context:
space:
mode:
authorHaelwenn <contact+git.pleroma.social@hacktivis.me>2020-07-17 18:54:30 +0000
committerHaelwenn <contact+git.pleroma.social@hacktivis.me>2020-07-17 18:54:30 +0000
commit10d46235cfae03901c297473043a5700a8c5e4f0 (patch)
tree028c932f72b48c1fb1c08962c0292a249ab00ff8 /test/pagination_test.exs
parentb782739ffe2db8316b1e8a18e5c21e419462c5dd (diff)
parent48f8b26c92880c0898daac3d691c61be0b891d0b (diff)
downloadpleroma-10d46235cfae03901c297473043a5700a8c5e4f0.tar.gz
pleroma-10d46235cfae03901c297473043a5700a8c5e4f0.zip
Merge branch 'fix-1958' into 'develop'
OpenAPI: Add :id to follower/following endpoints, fixes #1958 Closes #1958 See merge request pleroma/pleroma!2772
Diffstat (limited to 'test/pagination_test.exs')
-rw-r--r--test/pagination_test.exs14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/pagination_test.exs b/test/pagination_test.exs
index 9165427ae..e526f23e8 100644
--- a/test/pagination_test.exs
+++ b/test/pagination_test.exs
@@ -54,6 +54,20 @@ defmodule Pleroma.PaginationTest do
assert length(paginated) == 1
end
+
+ test "handles id gracefully", %{notes: notes} do
+ id = Enum.at(notes, 1).id |> Integer.to_string()
+
+ paginated =
+ Pagination.fetch_paginated(Object, %{
+ id: "9s99Hq44Cnv8PKBwWG",
+ max_id: id,
+ limit: 20,
+ offset: 0
+ })
+
+ assert length(paginated) == 1
+ end
end
describe "offset" do