Fix double item deletion test that started failing in Xcode 15

Summary:
I'm going through the IGListKit test suite with Xcode 15 and updating the tests that subsequently started failing with the new changes made to `UICollectionView` under the hood.

This was a test I originally added to help add to the code coverage, but it looks like my expectations about how it actually should work were incorrect, and it's now getting flagged by the new `UICollectionView` logic. I stepped through all the state with breakpoints and worked out how this is supposed to work.

Differential Revision: D49898019

fbshipit-source-id: fad21d14f0ae3a0ffbee8dde502114971f35fa1c
This commit is contained in:
Tim Oliver 2023-10-04 22:29:15 -07:00 committed by Facebook GitHub Bot
parent 20190830ec
commit 46e0372aab

View file

@ -1404,12 +1404,12 @@
XCTestExpectation *expectation = genExpectation;
[sectionController.collectionContext performBatchAnimated:YES updates:^(id<IGListBatchContext> batchContext) {
object.value = @2;
object.value = @3;
[batchContext deleteInSectionController:sectionController atIndexes:[NSIndexSet indexSetWithIndex:0]];
[batchContext deleteInSectionController:sectionController atIndexes:[NSIndexSet indexSetWithIndex:0]];
} completion:^(BOOL finished2) {
XCTAssertEqual([self.collectionView numberOfSections], 1);
XCTAssertEqual([self.collectionView numberOfItemsInSection:0], 2);
XCTAssertEqual([self.collectionView numberOfItemsInSection:0], 3);
[expectation fulfill];
}];
[self waitForExpectationsWithTimeout:30 handler:nil];