mirror of
https://github.com/zhigang1992/MagicalRecord.git
synced 2026-01-12 17:32:18 +08:00
Adjusting tests for context notifications to depend on which platform is running.
This commit is contained in:
@@ -323,9 +323,8 @@ NSString * const kMagicalRecordDidMergeChangesFromiCloudNotification = @"kMagica
|
||||
(
|
||||
MRLog(@"Using Private queue mode");
|
||||
context = [[self alloc] initWithConcurrencyType:NSPrivateQueueConcurrencyType];
|
||||
[context performBlockAndWait:^{
|
||||
[context setPersistentStoreCoordinator:[NSPersistentStoreCoordinator MR_defaultStoreCoordinator]];
|
||||
}];
|
||||
[context setParentContext:[NSManagedObjectContext MR_defaultContext]];
|
||||
|
||||
)
|
||||
|
||||
return context;
|
||||
|
||||
@@ -32,7 +32,12 @@
|
||||
{
|
||||
NSManagedObjectContext *testContext = [NSManagedObjectContext MR_contextThatNotifiesDefaultContextOnMainThread];
|
||||
|
||||
THREAD_ISOLATION_ENABLED(
|
||||
assertThatBool([testContext MR_notifiesMainContextOnSave], is(equalToBool(YES)));
|
||||
)
|
||||
PRIVATE_QUEUES_ENABLED(
|
||||
assertThat([testContext parentContext], is(equalTo([NSManagedObjectContext MR_defaultContext])));
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user