Don't generate an unmappable content error if a successful status code is returned along with an empty response body. This enables the use of the status code to indicate success without any content for mapping. In these cases, we wrap the targetObject of the loader into a RKObjectMappingResult at the @"" keyPath so that the delegates are invoked as expected. closes #189

This commit is contained in:
Blake Watters
2011-07-06 22:01:10 -04:00
parent 42067b9036
commit c171bed7d3
9 changed files with 111 additions and 10 deletions

View File

@@ -62,7 +62,7 @@
<EnvironmentVariables>
<EnvironmentVariable
key = "UISPEC_SPEC"
value = "RKObjectMappingNextGenSpec"
value = "RKManagedObjectLoaderSpec"
isEnabled = "NO">
</EnvironmentVariable>
<EnvironmentVariable
@@ -72,7 +72,7 @@
</EnvironmentVariable>
<EnvironmentVariable
key = "UISPEC_EXAMPLE"
value = "itShouldMapACollectionOfObjectsWithDynamicKeysAndRelationships"
value = "itShouldDeleteObjectFromLocalStoreOnDELETE"
isEnabled = "NO">
</EnvironmentVariable>
<EnvironmentVariable
@@ -87,13 +87,13 @@
</EnvironmentVariable>
<EnvironmentVariable
key = "UISPEC_SPEC"
value = "RKObjectMappingOperationSpec"
isEnabled = "YES">
value = "RKObjectLoaderSpec"
isEnabled = "NO">
</EnvironmentVariable>
<EnvironmentVariable
key = "UISPEC_EXAMPLE"
value = "itShouldSuccessfullyMapBoolsToStrings"
isEnabled = "YES">
value = "itShouldReturnSuccessWhenTheStatusCodeIs200ButTheResponseBodyIsEmpty"
isEnabled = "NO">
</EnvironmentVariable>
<EnvironmentVariable
key = "NSAutoreleaseHaltOnNoPool"