react-native-navigation的迁移库

RNNModalManagerTest.m 609B

1234567891011121314151617181920212223
  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