Skip to content

Instantly share code, notes, and snippets.

@simX
Created September 6, 2016 19:07
Show Gist options
  • Save simX/74991bdb71233a261e5cc96db0935118 to your computer and use it in GitHub Desktop.
Save simX/74991bdb71233a261e5cc96db0935118 to your computer and use it in GitHub Desktop.
func testReservationListPositions() {
let moc = CoreDataStack.sharedStack().mainObjectContext
let reservationListVC = ReservationListViewController()
do {
let reservation1 = try ReservationFactory.generateWithTemplate(ReservationFactory.Template(), parentContext: moc)
} catch {
print(error)
}
guard
let reservation2 = Factory<Reservation>.make()
else {
XCTFail("Unable to create notification")
return
}
let numSections = reservationListVC.fetchedResultsController.sections
print("numSections: \(numSections)")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment