react-native-navigation的迁移库

RNNModalManagerTest.m 611B

123456789101112131415161718192021222324
  1. #import <XCTest/XCTest.h>
  2. #import "RNNModalManager.m"
  3. @interface RNNModalManagerTest : XCTestCase
  4. @end
  5. @implementation RNNModalManagerTest
  6. - (void)testDismissAllModalsCleansPendingModalsToDismiss {
  7. RNNStore *store = [RNNStore new];
  8. [[store pendingModalIdsToDismiss] addObject:@"modal_id_1"];
  9. [[store pendingModalIdsToDismiss] addObject:@"modal_id_2"];
  10. [[store pendingModalIdsToDismiss] addObject:@"modal_id_3"];
  11. RNNModalManager *modalManager = [[RNNModalManager alloc] initWithStore:store];
  12. [modalManager dismissAllModals];
  13. XCTAssertTrue([[store pendingModalIdsToDismiss] count] == 0);
  14. }
  15. @end