fix(drone-dock): 适配小程序收款码图片展示与重试
This commit is contained in:
@@ -47,7 +47,7 @@ final class DroneDockPaymentViewModelTests: XCTestCase {
|
||||
XCTAssertEqual(service.codeRequests.last?.scenicID, 128)
|
||||
}
|
||||
|
||||
/// 生成失败或输入无效时不能留下可保存、可扫码的旧付款链接。
|
||||
/// 生成失败或输入无效时不能留下可保存、可扫码的旧小程序收款码。
|
||||
func testGeneratingFailureAndInvalidInputClearOldCode() async throws {
|
||||
let scope = PaymentContextBox(context())
|
||||
let service = try ImmediatePaymentService()
|
||||
@@ -83,7 +83,7 @@ final class DroneDockPaymentViewModelTests: XCTestCase {
|
||||
}
|
||||
}
|
||||
|
||||
/// 缺失登录范围或未加载的套餐不能创建付款链接。
|
||||
/// 缺失登录范围或未加载的套餐不能创建小程序收款码。
|
||||
func testInvalidContextAndUnknownProjectNeverCallCodeService() async throws {
|
||||
let scope = PaymentContextBox(context(token: ""))
|
||||
let service = try ImmediatePaymentService()
|
||||
@@ -162,7 +162,7 @@ final class DroneDockPaymentViewModelTests: XCTestCase {
|
||||
XCTAssertEqual(model.payCode?.price, Decimal(80))
|
||||
}
|
||||
|
||||
/// 更换登录凭证、账号、景区或门店后,旧会话付款链接均不能回填。
|
||||
/// 更换登录凭证、账号、景区或门店后,旧会话小程序收款码均不能回填。
|
||||
func testChangedIdentityRejectsInFlightQuoteAndClearsProjects() async throws {
|
||||
for changed in [context(token: "another-test-token"), context(userID: "other-user"),
|
||||
context(scenicID: 129), context(storeID: 38)] {
|
||||
@@ -364,7 +364,7 @@ private final class SuspendedPaymentProjectsService: DroneDockPaymentServing {
|
||||
}
|
||||
|
||||
func payCode(scenicID: Int, projectID: Int, price: String?) async throws -> DroneDockPayCode {
|
||||
throw APIError.networkFailed("列表测试不应生成付款链接")
|
||||
throw APIError.networkFailed("列表测试不应生成小程序收款码")
|
||||
}
|
||||
|
||||
func receipts(scenicID: Int, projectID: Int?, page: Int) async throws -> DroneDockReceiptsResponse {
|
||||
|
||||
Reference in New Issue
Block a user