From ad7fd161abdc749790c852a4036768361d4a8791 Mon Sep 17 00:00:00 2001 From: Diego Rey Mendez Date: Tue, 31 Oct 2023 00:58:22 +0100 Subject: [PATCH] Fixes some tests to work well for release builds --- .../PixelKit/Tests/PixelKitTests/PixelKitTests.swift | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/LocalPackages/PixelKit/Tests/PixelKitTests/PixelKitTests.swift b/LocalPackages/PixelKit/Tests/PixelKitTests/PixelKitTests.swift index d0482b3d29..db24a9277b 100644 --- a/LocalPackages/PixelKit/Tests/PixelKitTests/PixelKitTests.swift +++ b/LocalPackages/PixelKit/Tests/PixelKitTests/PixelKitTests.swift @@ -111,7 +111,11 @@ final class PixelKitTests: XCTestCase { XCTAssertEqual(firedHeaders[PixelKit.Header.moreInfo], "See \(PixelKit.duckDuckGoMorePrivacyInfo)") XCTAssertEqual(parameters[PixelKit.Parameters.appVersion], appVersion) +#if DEBUG XCTAssertEqual(parameters[PixelKit.Parameters.test], PixelKit.Values.test) +#else + XCTAssertNil(parameters[PixelKit.Parameters.test]) +#endif } // Run test @@ -153,7 +157,11 @@ final class PixelKitTests: XCTestCase { XCTAssertEqual(firedHeaders[PixelKit.Header.moreInfo], expectedMoreInfoString) XCTAssertEqual(parameters[PixelKit.Parameters.appVersion], appVersion) +#if DEBUG XCTAssertEqual(parameters[PixelKit.Parameters.test], PixelKit.Values.test) +#else + XCTAssertNil(parameters[PixelKit.Parameters.test]) +#endif } // Run test @@ -197,7 +205,11 @@ final class PixelKitTests: XCTestCase { XCTAssertEqual(firedHeaders[PixelKit.Header.moreInfo], expectedMoreInfoString) XCTAssertEqual(parameters[PixelKit.Parameters.appVersion], appVersion) +#if DEBUG XCTAssertEqual(parameters[PixelKit.Parameters.test], PixelKit.Values.test) +#else + XCTAssertNil(parameters[PixelKit.Parameters.test]) +#endif } // Run test