diff --git a/Tests/OrdersTests/OrdersTests.swift b/Tests/OrdersTests/OrdersTests.swift index b9dcdb2..e3e93a7 100644 --- a/Tests/OrdersTests/OrdersTests.swift +++ b/Tests/OrdersTests/OrdersTests.swift @@ -10,7 +10,7 @@ import Zip struct OrdersTests { let ordersURI = "/api/orders/v1/" - @Test("Order Generation", arguments: [true, false]) + @Test("Order Generation", .serialized, arguments: [true, false]) func orderGeneration(useEncryptedKey: Bool) async throws { try await withApp(useEncryptedKey: useEncryptedKey) { app, ordersService in let orderData = OrderData(title: "Test Order") @@ -24,13 +24,11 @@ struct OrdersTests { #expect(FileManager.default.fileExists(atPath: orderFolder.path.appending("/signature"))) #expect(FileManager.default.fileExists(atPath: orderFolder.path.appending("/order.json"))) - /* TODO: Fix this test let passJSONData = try String(contentsOfFile: orderFolder.path.appending("/order.json")).data(using: .utf8) let passJSON = try JSONSerialization.jsonObject(with: passJSONData!) as! [String: Any] #expect(passJSON["authenticationToken"] as? String == order.authenticationToken) let orderID = try order.requireID().uuidString #expect(passJSON["orderIdentifier"] as? String == orderID) - */ let manifestJSONData = try String(contentsOfFile: orderFolder.path.appending("/manifest.json")).data(using: .utf8) let manifestJSON = try JSONSerialization.jsonObject(with: manifestJSONData!) as! [String: Any] diff --git a/Tests/PassesTests/PassesTests.swift b/Tests/PassesTests/PassesTests.swift index 4374607..65689e0 100644 --- a/Tests/PassesTests/PassesTests.swift +++ b/Tests/PassesTests/PassesTests.swift @@ -10,7 +10,7 @@ import Zip struct PassesTests { let passesURI = "/api/passes/v1/" - @Test("Pass Generation", arguments: [true, false]) + @Test("Pass Generation", .serialized, arguments: [true, false]) func passGeneration(useEncryptedKey: Bool) async throws { try await withApp(useEncryptedKey: useEncryptedKey) { app, passesService in let passData = PassData(title: "Test Pass") @@ -24,14 +24,12 @@ struct PassesTests { #expect(FileManager.default.fileExists(atPath: passFolder.path.appending("/signature"))) #expect(FileManager.default.fileExists(atPath: passFolder.path.appending("/pass.json"))) - /* TODO: Fix this test let passJSONData = try String(contentsOfFile: passFolder.path.appending("/pass.json")).data(using: .utf8) let passJSON = try JSONSerialization.jsonObject(with: passJSONData!) as! [String: Any] #expect(passJSON["authenticationToken"] as? String == pass.authenticationToken) let passID = try pass.requireID().uuidString #expect(passJSON["serialNumber"] as? String == passID) #expect(passJSON["description"] as? String == passData.title) - */ let manifestJSONData = try String(contentsOfFile: passFolder.path.appending("/manifest.json")).data(using: .utf8) let manifestJSON = try JSONSerialization.jsonObject(with: manifestJSONData!) as! [String: Any] @@ -80,14 +78,12 @@ struct PassesTests { #expect(FileManager.default.fileExists(atPath: passFolder.path.appending("/signature"))) #expect(FileManager.default.fileExists(atPath: passFolder.path.appending("/pass.json"))) - /* TODO: Fix this test let passJSONData = try String(contentsOfFile: passFolder.path.appending("/pass.json")).data(using: .utf8) let passJSON = try JSONSerialization.jsonObject(with: passJSONData!) as! [String: Any] #expect(passJSON["authenticationToken"] as? String == pass.authenticationToken) let passID = try pass.requireID().uuidString #expect(passJSON["serialNumber"] as? String == passID) #expect(passJSON["description"] as? String == passData.title) - */ let personalizationJSONData = try String(contentsOfFile: passFolder.path.appending("/personalization.json")).data(using: .utf8) let personalizationJSON = try JSONSerialization.jsonObject(with: personalizationJSONData!) as! [String: Any]