diff --git a/ToasterTests/ToasterTests.swift b/ToasterTests/ToasterTests.swift index a93b4a5..348a608 100644 --- a/ToasterTests/ToasterTests.swift +++ b/ToasterTests/ToasterTests.swift @@ -80,4 +80,13 @@ class ToasterTests: XCTestCase { wait(for: [disappearExpectation], timeout: 3) } + func testToastWindowNotToBeKeyWindow() { + let existingKeyWindow = UIWindow(frame: .zero) + existingKeyWindow.makeKey() + let toastWindow = ToastWindow(frame: .zero, mainWindow: existingKeyWindow) + toastWindow.makeKey() + XCTAssertTrue(existingKeyWindow.isKeyWindow) + XCTAssertFalse(toastWindow.isKeyWindow) + } + }