diff --git a/Tests/GliderTests/Core+Tests.swift b/Tests/GliderTests/Core+Tests.swift index 5b353fc..6f74b03 100644 --- a/Tests/GliderTests/Core+Tests.swift +++ b/Tests/GliderTests/Core+Tests.swift @@ -57,6 +57,7 @@ final class CoreTests: XCTestCase { /// so you can avoid to write all the messages on it even if logger accepts them. func test_minimumTransportAcceptLevel() throws { var minAcceptedLevel: Glider.Level? = .error + var passedCountWhenSet = 0 var passedCountWhenNil = 0 let transport = TestTransport { event, _ in @@ -64,6 +65,7 @@ final class CoreTests: XCTestCase { if let minAcceptedLevel = minAcceptedLevel { XCTAssertTrue(event.level <= minAcceptedLevel) + passedCountWhenSet += 1 } else { passedCountWhenNil += 1 } @@ -85,6 +87,8 @@ final class CoreTests: XCTestCase { log.error?.write(msg: "[SET] Should pass both") log.critical?.write(msg: "[SET] Should pass both") + XCTAssertEqual(passedCountWhenSet, 2) + // ignore transport.minimumAcceptedLevel = nil minAcceptedLevel = nil