Commits

Anonymous committed ebb5992

Check window controller is set to nil in applicationWillTerminate

  • Participants
  • Parent commits 1346639

Comments (0)

Files changed (1)

File WhereIsMyMac-WithUnitTests/Classes/WhereIsMyMacAppDelegateTests.m

 	[mockWindow verify];
 }
 
-- (void)testApplicationWillTerminateClosesWindow
+- (void)testApplicationWillTerminateClosesAndNilsOutWindowController
 {
 	// Setup
 	[[_mockWindowController expect] close];
 	
 	// Execute
 	[_appDelegate applicationWillTerminate:nil];
+	
+	// Verify
+	STAssertNil(_appDelegate.windowController, nil);
 }
 
 @end