From faaa8230acec772d1959e2c119b53838de9f56f2 Mon Sep 17 00:00:00 2001 From: Francesco Paolo Severino Date: Wed, 25 Sep 2024 23:28:02 +0200 Subject: [PATCH] Properly test the new for-in loops --- Tests/OrdersTests/OrdersTests.swift | 1 + Tests/OrdersTests/Templates/EmptyDir/.gitkeep | 0 Tests/PassesTests/PassesTests.swift | 2 ++ Tests/PassesTests/Templates/EmptyDir/.gitkeep | 0 4 files changed, 3 insertions(+) create mode 100644 Tests/OrdersTests/Templates/EmptyDir/.gitkeep create mode 100644 Tests/PassesTests/Templates/EmptyDir/.gitkeep diff --git a/Tests/OrdersTests/OrdersTests.swift b/Tests/OrdersTests/OrdersTests.swift index d674059..9833474 100644 --- a/Tests/OrdersTests/OrdersTests.swift +++ b/Tests/OrdersTests/OrdersTests.swift @@ -62,6 +62,7 @@ final class OrdersTests: XCTestCase { let iconData = try Data(contentsOf: orderFolder.appendingPathComponent("/icon.png")) let iconHash = Array(SHA256.hash(data: iconData)).hex XCTAssertEqual(manifestJSON["icon.png"] as? String, iconHash) + XCTAssertNotNil(manifestJSON["pet_store_logo.png"]) } // Tests the API Apple Wallet calls to get orders diff --git a/Tests/OrdersTests/Templates/EmptyDir/.gitkeep b/Tests/OrdersTests/Templates/EmptyDir/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/Tests/PassesTests/PassesTests.swift b/Tests/PassesTests/PassesTests.swift index 06cab2f..6720847 100644 --- a/Tests/PassesTests/PassesTests.swift +++ b/Tests/PassesTests/PassesTests.swift @@ -63,6 +63,8 @@ final class PassesTests: XCTestCase { let iconData = try Data(contentsOf: passFolder.appendingPathComponent("/icon.png")) let iconHash = Array(Insecure.SHA1.hash(data: iconData)).hex XCTAssertEqual(manifestJSON["icon.png"] as? String, iconHash) + XCTAssertNotNil(manifestJSON["logo.png"]) + XCTAssertNotNil(manifestJSON["personalizationLogo.png"]) } func testPassesGeneration() async throws { diff --git a/Tests/PassesTests/Templates/EmptyDir/.gitkeep b/Tests/PassesTests/Templates/EmptyDir/.gitkeep new file mode 100644 index 0000000..e69de29