Skip to content

Instantly share code, notes, and snippets.

@westonplatter
Last active January 4, 2016 21:19
Show Gist options
  • Select an option

  • Save westonplatter/8680518 to your computer and use it in GitHub Desktop.

Select an option

Save westonplatter/8680518 to your computer and use it in GitHub Desktop.
- (void)testUserCreate
{
User *user = [NSEntityDescription
insertNewObjectForEntityForName:@"User"
inManagedObjectContext:self.moc];
[user setEmail:@"[email protected]"];
NSError *error = nil;
BOOL result = [self.moc save:&error];
XCTAssertNil(error, @"save should not raise errors");
XCTAssertTrue(result, @"save should be true");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment