Skip to content

Commit

Permalink
Update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
bbirman committed Nov 25, 2024
1 parent 01df484 commit 20ab72c
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ - (void)testSnapshotRespondsToStateEvents
UIScene *scene = UIApplication.sharedApplication.connectedScenes.allObjects.firstObject;
[[NSNotificationCenter defaultCenter] postNotificationName:UISceneDidEnterBackgroundNotification object:scene];
XCTAssertTrue(presentOnBackground, @"Did not respond to scene background.");
[[NSNotificationCenter defaultCenter] postNotificationName:UISceneWillEnterForegroundNotification object:scene];
[[NSNotificationCenter defaultCenter] postNotificationName:UISceneDidActivateNotification object:scene];
XCTAssertTrue(dismissOnDidBecomeActive, @"Did not respond to app did become active.");
}

Expand Down Expand Up @@ -241,7 +241,7 @@ - (void)testDefaultSnapshotViewControllerIsProvided
// This will simulate that the snapshot view is being presented
UIView* fakeView = [UIView new];
[fakeView addSubview:defaultViewControllerOnPresentation.view];
[[NSNotificationCenter defaultCenter] postNotificationName:UISceneWillEnterForegroundNotification
[[NSNotificationCenter defaultCenter] postNotificationName:UISceneDidActivateNotification
object:scene];
XCTAssertEqual(defaultViewControllerOnPresentation, defaultViewControllerOnDismissal, @"Default snapshot view controller on dismissal is different than the one provided on presentation!");
}
Expand Down Expand Up @@ -288,7 +288,7 @@ - (void)testCustomSnapshotViewControllerIsUsed
// This will simulate that the snapshot view is being presented
UIView* fakeView = [UIView new];
[fakeView addSubview:customSnapshot.view];
[[NSNotificationCenter defaultCenter] postNotificationName:UISceneWillEnterForegroundNotification object:scene];
[[NSNotificationCenter defaultCenter] postNotificationName:UISceneDidActivateNotification object:scene];
XCTAssertEqual(customSnapshot, snapshotOnDismissal, @"Custom snapshot view controller was not used on dismissal!");
}

Expand Down

0 comments on commit 20ab72c

Please sign in to comment.