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\""
This commit is contained in:
Mark Felder 2023-12-21 01:47:12 +00:00
parent 0820c23988
commit 347e5f33c7

View File

@ -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