Skip to content

Commit

Permalink
Test for IGListStackSectionController
Browse files Browse the repository at this point in the history
  • Loading branch information
MarvinNazari committed Aug 3, 2017
1 parent da71d87 commit ad267b0
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions Tests/IGListStackSectionControllerTests.m
Original file line number Diff line number Diff line change
Expand Up @@ -826,6 +826,17 @@ - (void)test_whenDeselectingChildSectionControllerIndex_thatCorrectCellDeselecte
XCTAssertFalse([[self.collectionView cellForItemAtIndexPath:path] isSelected]);
}

- (void)test_whenSelectingChildSectionControllerIndex_thatCorrectCellSelected {
[self setupWithObjects:@[
[[IGTestObject alloc] initWithKey:@0 value:@[@1, @2, @3]],
[[IGTestObject alloc] initWithKey:@1 value:@[@1, @1]]
]];

NSIndexPath *path = [NSIndexPath indexPathForItem:0 inSection:1];
[self.collectionView selectItemAtIndexPath:path animated:NO scrollPosition:UICollectionViewScrollPositionTop];
XCTAssertTrue([[self.collectionView cellForItemAtIndexPath:path] isSelected]);
}

- (void)test_whenRemovingSection_withWorkingRange_thatChildSectionControllersReceiveEvents {
[self setupWithObjects:@[
[[IGTestObject alloc] initWithKey:@0 value:@[@1, @2, @3]],
Expand Down

0 comments on commit ad267b0

Please sign in to comment.