Skip to content

Commit

Permalink
Fixes some tests to work well for release builds
Browse files Browse the repository at this point in the history
  • Loading branch information
diegoreymendez committed Oct 30, 2023
1 parent 89ff162 commit ad7fd16
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions LocalPackages/PixelKit/Tests/PixelKitTests/PixelKitTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit ad7fd16

Please sign in to comment.