Skip to content

Commit 05a848a

Browse files
committed
fix: use correct pagination parameter in list guilds test
The guilds list endpoint uses 'limit' and 'offset' parameters, not 'pageSize' and 'currentPage'. Update test to match API contract. This test was sending pageSize=5 but the endpoint ignored it and used the default limit of 20, causing the assertion to fail. Also remove unnecessary commit() call from test setup. Fixes test: TestAPIPaginationConsistency::test_pagination_offset_and_limit
1 parent eb9cd45 commit 05a848a

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

tests/integration/test_api_endpoints.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -487,10 +487,9 @@ async def test_pagination_offset_and_limit(
487487
db_session.add(guild)
488488

489489
await db_session.flush()
490-
await db_session.commit()
491490

492491
# Test with explicit limit
493-
response = await api_client.get("/api/guilds/list?pageSize=5")
492+
response = await api_client.get("/api/guilds/list?limit=5")
494493
if response.status_code == HTTP_200_OK:
495494
data = response.json()
496495
# Should respect page size limit

0 commit comments

Comments
 (0)