Skip to content

Commit

Permalink
Even more APNS tests
Browse files Browse the repository at this point in the history
  • Loading branch information
fpseverino committed Aug 20, 2024
1 parent 6584435 commit 259979d
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Tests/OrdersTests/OrdersTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,14 @@ final class OrdersTests: XCTestCase {
XCTAssertEqual(res.status, .internalServerError)
}
)

// Test `OrderDataMiddleware` update method
orderData.title = "Test Order 2"
do {
try await orderData.update(on: app.db)
} catch let error as HTTPClientError {
XCTAssertEqual(error.self, .remoteConnectionClosed)
}
}

func testOrdersError() {
Expand Down
8 changes: 8 additions & 0 deletions Tests/PassesTests/PassesTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,14 @@ final class PassesTests: XCTestCase {
XCTAssertEqual(res.status, .internalServerError)
}
)

// Test `PassDataMiddleware` update method
passData.title = "Test Pass 2"
do {
try await passData.update(on: app.db)
} catch let error as HTTPClientError {
XCTAssertEqual(error.self, .remoteConnectionClosed)
}
}

func testPassesError() {
Expand Down

0 comments on commit 259979d

Please sign in to comment.