File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -823,7 +823,7 @@ public struct PageParams {
823823 /// Number of items returned per page.
824824 public let perPage : Int ?
825825
826- public init ( page: Int ? , perPage: Int ? ) {
826+ public init ( page: Int ? = nil , perPage: Int ? = nil ) {
827827 self . page = page
828828 self . perPage = perPage
829829 }
Original file line number Diff line number Diff line change @@ -253,9 +253,10 @@ final class AuthClientIntegrationTests: XCTestCase {
253253
254254 func testListUsers( ) async throws {
255255 let client = Self . makeClient ( serviceRole: true )
256- let pagination = try await client. admin. listUsers ( )
257- XCTAssertFalse ( pagination. users. isEmpty )
256+ let pagination = try await client. admin. listUsers ( params : PageParams ( perPage : 10 ) )
257+ XCTAssertEqual ( pagination. users. count , 10 )
258258 XCTAssertEqual ( pagination. aud, " authenticated " )
259+ XCTAssertEqual ( pagination. nextPage, 2 )
259260 }
260261
261262 @discardableResult
You can’t perform that action at this time.
0 commit comments