Skip to content

Commit

Permalink
Fix PointOfSaleProductService test case for special case when empty…
Browse files Browse the repository at this point in the history
… data are returned for page number > 1.
  • Loading branch information
jaclync committed Dec 19, 2024
1 parent 0242c2f commit 11e7daa
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,11 @@ final class PointOfSaleProductServiceTests: XCTestCase {
}

func test_PointOfSaleItemServiceProtocol_when_empty_data_for_non_first_page_then_returns_empty_items_and_no_next_page() async throws {
// Given
network.simulateResponse(requestUrlSuffix: "products", filename: "empty-data-array")

// When
let (items, hasNextPage) = try await itemProvider.providePointOfSaleItems()
let (items, hasNextPage) = try await itemProvider.providePointOfSaleItems(pageNumber: 2)

// Then
XCTAssertTrue(items.isEmpty)
Expand Down

0 comments on commit 11e7daa

Please sign in to comment.