mirror of
https://github.com/Instagram/IGListKit
synced 2026-05-05 22:48:21 +00:00
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:
parent
20190830ec
commit
46e0372aab
1 changed files with 2 additions and 2 deletions
|
|
@ -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];
|
||||
|
|
|
|||
Loading…
Reference in a new issue