commit: 347e5f33c775ae1de8bffe0ba84611b3d7a59d8f
parent 0820c23988debd0b31e917dea66fb9e122fc3a98
Author: Mark Felder <feld@feld.me>
Date: Thu, 21 Dec 2023 01:47:12 +0000
Fix regex string match due to OTP26 key order change
OTP25:
"<http://localhost:4001/api/v1/favourites?limit=1&max_id=Ad1FhzPIS7gcHjUcoC&offset=0>; rel=\"next\""
OTP26:
"<http://localhost:4001/api/v1/favourites?offset=0&limit=1&max_id=Ad1FmOIAXiSNgygflA>; rel=\"next\""
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/test/pleroma/web/mastodon_api/controllers/status_controller_test.exs b/test/pleroma/web/mastodon_api/controllers/status_controller_test.exs
@@ -2191,7 +2191,7 @@ defmodule Pleroma.Web.MastodonAPI.StatusControllerTest do
# Using the header for pagination works correctly
[next, _] = get_resp_header(result, "link") |> hd() |> String.split(", ")
- [_, max_id] = Regex.run(~r/max_id=([^&]+)/, next)
+ [_, max_id] = Regex.run(~r/max_id=([^&]+)>.*/, next)
assert max_id == third_favorite.id