mirror of
https://github.com/zhigang1992/NTDCoreDataTableViewController.git
synced 2026-05-10 03:05:36 +08:00
Test Sut logs error which occurs during FRC is fetching.
This commit is contained in:
@@ -72,4 +72,16 @@
|
||||
XCTAssertTrue([(NTDFakeCDTVC *)sut loggedFailure]);
|
||||
}
|
||||
|
||||
- (void)testSutWillLogErrorInFRCsFetch
|
||||
{
|
||||
sut = [[NTDFakeCDTVC alloc] init];
|
||||
sut.fetchedResultsController = [[NTDFakeFetchedResultsController alloc] init];
|
||||
|
||||
[(NTDFakeFetchedResultsController *)sut.fetchedResultsController setFetchWillHaveError:YES];
|
||||
// when
|
||||
[sut performFetch];
|
||||
// then
|
||||
XCTAssertTrue([(NTDFakeCDTVC *)sut loggedError]);
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
Reference in New Issue
Block a user