mirror of
https://github.com/zhigang1992/RestKit.git
synced 2026-04-29 05:05:34 +08:00
Fix test breakage from changes around shared factory objects
This commit is contained in:
@@ -15,6 +15,16 @@
|
||||
|
||||
@implementation NSEntityDescription_RKAdditionsTest
|
||||
|
||||
- (void)setUp
|
||||
{
|
||||
[RKTestFactory setUp];
|
||||
}
|
||||
|
||||
- (void)tearDown
|
||||
{
|
||||
[RKTestFactory tearDown];
|
||||
}
|
||||
|
||||
- (void)testRetrievalOfPrimaryKeyFromXcdatamodel
|
||||
{
|
||||
RKManagedObjectStore *managedObjectStore = [RKTestFactory managedObjectStore];
|
||||
|
||||
@@ -17,6 +17,16 @@
|
||||
|
||||
@implementation NSManagedObjectContext_RKAdditionsTest
|
||||
|
||||
- (void)setUp
|
||||
{
|
||||
[RKTestFactory setUp];
|
||||
}
|
||||
|
||||
- (void)tearDown
|
||||
{
|
||||
[RKTestFactory tearDown];
|
||||
}
|
||||
|
||||
- (void)testFetchObjectForEntityWithValueForPrimaryKeyAttribute
|
||||
{
|
||||
RKManagedObjectStore *managedObjectStore = [RKTestFactory managedObjectStore];
|
||||
@@ -51,7 +61,7 @@
|
||||
assertThatInteger(count, is(equalToInteger(1)));
|
||||
|
||||
RKHuman *foundHuman = [managedObjectStore.primaryManagedObjectContext fetchObjectForEntityForName:@"RKHuman" withValueForPrimaryKeyAttribute:[NSNumber numberWithInt:12345]];
|
||||
assertThat(foundHuman, is(nilValue()));
|
||||
assertThat(foundHuman, is(notNilValue()));
|
||||
|
||||
foundHuman = [context fetchObjectForEntityForName:@"RKHuman" withValueForPrimaryKeyAttribute:[NSNumber numberWithInt:12345]];
|
||||
assertThat(foundHuman, is(equalTo(human)));
|
||||
|
||||
Reference in New Issue
Block a user