Advertisement
Guest User

Untitled

a guest
Dec 22nd, 2014
160
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.80 KB | None | 0 0
  1. func testBartenderQueryForGivenEvent()
  2. {
  3. let expectation = self.expectationWithDescription("Wait for the bartender to be retrieved")
  4.  
  5. Venue.queryForTestVenue { (venue, error) -> Void in
  6. let testVenue = venue as Venue
  7.  
  8. testVenue.bartenders { (bartenders, error) -> Void in
  9.  
  10. //NOTE: This casting is a workaround for an issue with Arrays in the Tests target
  11. //You must convert the array to [AnyObject]
  12. let theBartenders = bartenders as [AnyObject]
  13. let theBartender: AnyObject? = theBartenders.first
  14. XCTAssertNotNil(theBartender, "Bartender retrieved")
  15. expectation.fulfill()
  16. }
  17. }
  18. waitForExpectationsWithTimeout(kParseMaxTimeout, handler: nil)
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement