mirror of
https://github.com/zhigang1992/RestKit.git
synced 2026-06-12 17:18:57 +08:00
31 lines
670 B
Objective-C
31 lines
670 B
Objective-C
//
|
|
// RKManagedObjectMappingSpec.m
|
|
// RestKit
|
|
//
|
|
// Created by Blake Watters on 5/31/11.
|
|
// Copyright 2011 Two Toasters. All rights reserved.
|
|
//
|
|
|
|
#import "RKSpecEnvironment.h"
|
|
#import "RKManagedObjectMapping.h"
|
|
|
|
@interface RKManagedObjectMappingSpec : RKSpec {
|
|
|
|
}
|
|
|
|
@end
|
|
|
|
|
|
@implementation RKManagedObjectMappingSpec
|
|
|
|
- (void)itShouldReturnTheDefaultValueForACoreDataAttribute {
|
|
// Load Core Data
|
|
RKSpecNewManagedObjectStore();
|
|
|
|
RKManagedObjectMapping* mapping = [RKManagedObjectMapping mappingForEntityWithName:@"RKCat"];
|
|
id value = [mapping defaultValueForMissingAttribute:@"name"];
|
|
assertThat(value, is(equalTo(@"Kitty Cat!")));
|
|
}
|
|
|
|
@end
|