summaryrefslogtreecommitdiff
path: root/test/pagination_test.exs
diff options
context:
space:
mode:
authorMaksim Pechnikov <parallel588@gmail.com>2020-07-22 09:24:16 +0300
committerMaksim Pechnikov <parallel588@gmail.com>2020-07-22 09:24:16 +0300
commit8d6f7aec2145fc012677cfd9f61cb3e2720edd68 (patch)
treee39c58741a47b98311b3d09e511dd6f52b7b8bc0 /test/pagination_test.exs
parent5fcb3e873822c602a5f50cbeb159427e02ea1818 (diff)
parentc36113cdf5865cbccbd1da2f7404454134139e43 (diff)
downloadpleroma-8d6f7aec2145fc012677cfd9f61cb3e2720edd68.tar.gz
pleroma-8d6f7aec2145fc012677cfd9f61cb3e2720edd68.zip
Merge branch 'develop' into issue/1023
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