summaryrefslogtreecommitdiff
path: root/test/pagination_test.exs
diff options
context:
space:
mode:
authorlain <lain@soykaf.club>2020-07-27 16:35:47 +0000
committerlain <lain@soykaf.club>2020-07-27 16:35:47 +0000
commite1a1c8e7de5e10fa64d168dc5d35a80b96767395 (patch)
treec0057448e323c730bea2c76cecf9efb85ef14181 /test/pagination_test.exs
parent4a6389316dac53c1ca2ec36d160690476d881185 (diff)
parent2a3abfd326f0cbb588dfe66a23e9783be3038a5e (diff)
downloadpleroma-e1a1c8e7de5e10fa64d168dc5d35a80b96767395.tar.gz
pleroma-e1a1c8e7de5e10fa64d168dc5d35a80b96767395.zip
Merge branch 'develop' into 'cleanup/masto_fe-default_settings'
# Conflicts: # lib/pleroma/web/views/masto_fe_view.ex
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