aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorlain <lain@soykaf.club>2021-01-11 15:30:40 +0100
committerlain <lain@soykaf.club>2021-01-11 15:30:40 +0100
commite1a547d7d3913974e1049c5dc60d46812c8abf3f (patch)
tree3018d5640068ba2ae58f36ca7d87eee4ecdf3b7b /test
parentbe7a76abc064ce49d18cb1639e875d7b92b6b690 (diff)
downloadpleroma-e1a547d7d3913974e1049c5dc60d46812c8abf3f.tar.gz
ChatMessages: Fix pagination headers.
They used to contain the path parameter `id` as query param, which would break the link.
Diffstat (limited to 'test')
-rw-r--r--test/pleroma/web/pleroma_api/controllers/chat_controller_test.exs8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/pleroma/web/pleroma_api/controllers/chat_controller_test.exs b/test/pleroma/web/pleroma_api/controllers/chat_controller_test.exs
index 24efeeb73..d0b520fbc 100644
--- a/test/pleroma/web/pleroma_api/controllers/chat_controller_test.exs
+++ b/test/pleroma/web/pleroma_api/controllers/chat_controller_test.exs
@@ -211,12 +211,12 @@ defmodule Pleroma.Web.PleromaAPI.ChatControllerTest do
assert String.match?(
next,
- ~r(#{api_endpoint}.*/messages\?id=.*&limit=\d+&max_id=.*; rel=\"next\"$)
+ ~r(#{api_endpoint}.*/messages\?limit=\d+&max_id=.*; rel=\"next\"$)
)
assert String.match?(
prev,
- ~r(#{api_endpoint}.*/messages\?id=.*&limit=\d+&min_id=.*; rel=\"prev\"$)
+ ~r(#{api_endpoint}.*/messages\?limit=\d+&min_id=.*; rel=\"prev\"$)
)
assert length(result) == 20
@@ -229,12 +229,12 @@ defmodule Pleroma.Web.PleromaAPI.ChatControllerTest do
assert String.match?(
next,
- ~r(#{api_endpoint}.*/messages\?id=.*&limit=\d+&max_id=.*; rel=\"next\"$)
+ ~r(#{api_endpoint}.*/messages\?limit=\d+&max_id=.*; rel=\"next\"$)
)
assert String.match?(
prev,
- ~r(#{api_endpoint}.*/messages\?id=.*&limit=\d+&max_id=.*&min_id=.*; rel=\"prev\"$)
+ ~r(#{api_endpoint}.*/messages\?limit=\d+&max_id=.*&min_id=.*; rel=\"prev\"$)
)
assert length(result) == 10