Source

tdd_ios_kiwi / code / TaskList / TaskList / Task+CRUD.m

Diff from to

code/TaskList/TaskList/Task+CRUD.m

     NSEntityDescription *entity = [NSEntityDescription
                                    entityForName:@"Task" inManagedObjectContext:context];
     [fetchRequest setEntity:entity];
+//    fetchRequest.predicate = [NSPredicate predicateWithFormat:@"category.name = %@", category.name];
+//    fetchRequest.sortDescriptors = @[[NSSortDescriptor sortDescriptorWithKey:@"name" ascending:YES]];
     return fetchRequest;
 }
 + (NSArray *) allTaskFromContext:(NSManagedObjectContext *)context{
     
 }
 + (Task *) taskWithName:(NSString*)name fromContext:(NSManagedObjectContext *)context{
-    Task *task = [NSEntityDescription insertNewObjectForEntityForName:@"Trim" inManagedObjectContext:context];
+    Task *task = [NSEntityDescription insertNewObjectForEntityForName:@"Task" inManagedObjectContext:context];
     task.name = name;
     NSError *error = nil;
     [context save:&error];