summaryrefslogtreecommitdiff
path: root/test/pagination_test.exs
diff options
context:
space:
mode:
authorlain <lain@soykaf.club>2020-06-08 09:11:55 +0000
committerlain <lain@soykaf.club>2020-06-08 09:11:55 +0000
commita1aa9fa91320d527e93435fe236534003cd85d31 (patch)
treeaf6431405350fef893d0f903b47717a9866aa5a7 /test/pagination_test.exs
parentd74985af2381b1c0dae2bc9c79c14582e5c61b97 (diff)
parent167812a3f2c1470012cb161f3c5ba4c021fbad97 (diff)
downloadpleroma-a1aa9fa91320d527e93435fe236534003cd85d31.tar.gz
pleroma-a1aa9fa91320d527e93435fe236534003cd85d31.zip
Merge branch 'activity-pub-use-atoms-as-keys' into 'develop'
Use atoms as keys in `ActivityPub.fetch_*` options See merge request pleroma/pleroma!2629
Diffstat (limited to 'test/pagination_test.exs')
-rw-r--r--test/pagination_test.exs12
1 files changed, 6 insertions, 6 deletions
diff --git a/test/pagination_test.exs b/test/pagination_test.exs
index d5b1b782d..9165427ae 100644
--- a/test/pagination_test.exs
+++ b/test/pagination_test.exs
@@ -21,7 +21,7 @@ defmodule Pleroma.PaginationTest do
id = Enum.at(notes, 2).id |> Integer.to_string()
%{total: total, items: paginated} =
- Pagination.fetch_paginated(Object, %{"min_id" => id, "total" => true})
+ Pagination.fetch_paginated(Object, %{min_id: id, total: true})
assert length(paginated) == 2
assert total == 5
@@ -31,7 +31,7 @@ defmodule Pleroma.PaginationTest do
id = Enum.at(notes, 2).id |> Integer.to_string()
%{total: total, items: paginated} =
- Pagination.fetch_paginated(Object, %{"since_id" => id, "total" => true})
+ Pagination.fetch_paginated(Object, %{since_id: id, total: true})
assert length(paginated) == 2
assert total == 5
@@ -41,7 +41,7 @@ defmodule Pleroma.PaginationTest do
id = Enum.at(notes, 1).id |> Integer.to_string()
%{total: total, items: paginated} =
- Pagination.fetch_paginated(Object, %{"max_id" => id, "total" => true})
+ Pagination.fetch_paginated(Object, %{max_id: id, total: true})
assert length(paginated) == 1
assert total == 5
@@ -50,7 +50,7 @@ defmodule Pleroma.PaginationTest do
test "paginates by min_id & limit", %{notes: notes} do
id = Enum.at(notes, 2).id |> Integer.to_string()
- paginated = Pagination.fetch_paginated(Object, %{"min_id" => id, "limit" => 1})
+ paginated = Pagination.fetch_paginated(Object, %{min_id: id, limit: 1})
assert length(paginated) == 1
end
@@ -64,13 +64,13 @@ defmodule Pleroma.PaginationTest do
end
test "paginates by limit" do
- paginated = Pagination.fetch_paginated(Object, %{"limit" => 2}, :offset)
+ paginated = Pagination.fetch_paginated(Object, %{limit: 2}, :offset)
assert length(paginated) == 2
end
test "paginates by limit & offset" do
- paginated = Pagination.fetch_paginated(Object, %{"limit" => 2, "offset" => 4}, :offset)
+ paginated = Pagination.fetch_paginated(Object, %{limit: 2, offset: 4}, :offset)
assert length(paginated) == 1
end