diff --git a/Tests/IGListAdapterTests.m b/Tests/IGListAdapterTests.m index 273ba858..42a969c7 100644 --- a/Tests/IGListAdapterTests.m +++ b/Tests/IGListAdapterTests.m @@ -157,6 +157,21 @@ XCTAssertEqualObjects(identifier, @"IGNibNameUICollectionViewCell"); } +- (void)test_whenDequeueingTwoCellsOfTheSameClassWithDifferentReuseIdentifiers_thatBothReuseIdentifiersReturnCells { + self.dataSource.objects = @[@1, @2]; + [self.adapter reloadDataWithCompletion:nil]; + UICollectionViewCell *cell1 = [self.adapter dequeueReusableCellOfClass:[UICollectionViewCell class] + withReuseIdentifier:@"reuse-1" + forSectionController:[self.adapter sectionControllerForObject:@1] + atIndex:0]; + UICollectionViewCell *cell2 = [self.adapter dequeueReusableCellOfClass:[UICollectionViewCell class] + withReuseIdentifier:@"reuse-2" + forSectionController:[self.adapter sectionControllerForObject:@1] + atIndex:0]; + XCTAssertNotNil(cell1); + XCTAssertNotNil(cell2); +} + - (void)test_whenDataSourceChanges_thatBackgroundViewVisibilityChanges { self.dataSource.objects = @[@1]; UIView *background = [[UIView alloc] init];