Skip to content

Commit

Permalink
Removed some extra trailing spaces
Browse files Browse the repository at this point in the history
  • Loading branch information
jilouc authored and jspahrsummers committed Oct 14, 2013
1 parent d422ec8 commit 6ea33b9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions Mantle/MTLManagedObjectAdapter.m
Expand Up @@ -438,14 +438,14 @@ - (id)managedObjectFromModel:(MTLModel<MTLManagedObjectSerializing> *)model inse
} else {
relationshipCollection = [NSMutableSet set];
}

for (MTLModel *model in value) {
NSManagedObject *nestedObject = objectForRelationshipFromModel(model);
if (nestedObject == nil) return NO;

[relationshipCollection addObject:nestedObject];
}

[managedObject setValue:relationshipCollection forKey:managedObjectKey];
} else {
NSManagedObject *nestedObject = objectForRelationshipFromModel(value);
Expand Down
10 changes: 5 additions & 5 deletions MantleTests/MTLManagedObjectAdapterSpec.m
Expand Up @@ -229,15 +229,15 @@

expect(parentOne.objectID).to.equal(parentTwo.objectID);
});

it(@"should update relationships for an existing object", ^{
NSError *error;
MTLParent *parentOne = [MTLManagedObjectAdapter managedObjectFromModel:parentModel insertingIntoContext:context error:&error];
expect(parentOne).notTo.beNil();
expect(error).to.beNil();
expect(parentOne.orderedChildren).to.haveCountOf(3);
expect(parentOne.unorderedChildren).to.haveCountOf(3);

MTLChild *child1Parent1 = parentOne.orderedChildren[0];
MTLChild *child2Parent1 = parentOne.orderedChildren[1];
MTLChild *child3Parent1 = parentOne.orderedChildren[2];
Expand All @@ -253,15 +253,15 @@
expect(error).to.beNil();
expect(parentTwo.orderedChildren).to.haveCountOf(2);
expect(parentTwo.unorderedChildren).to.haveCountOf(2);

for (MTLChild *child in parentTwo.orderedChildren) {
expect(child.childID).notTo.equal(child2Parent1.childID);
}

for (MTLChild *child in parentTwo.unorderedChildren) {
expect(child.childID).notTo.equal(childToDeleteModel.childID);
}

MTLChild *child1Parent2 = parentTwo.orderedChildren[0];
MTLChild *child2Parent2 = parentTwo.orderedChildren[1];
expect(child1Parent2).to.equal(child1Parent1);
Expand Down

0 comments on commit 6ea33b9

Please sign in to comment.