Created
March 3, 2016 15:42
-
-
Save diatrevolo/67ef14be0a667e15ced3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func testGetItems_withIncorrectArray() { | |
client = MyRESTClient(url: NSURL(string: "http://notRight")!, manager: manager!) | |
let expectation = expectationWithDescription("GetJSONArray") | |
var itemsArray: [MyItem]? | |
client?.getAvailableItems { (items) -> () in | |
itemsArray = items | |
expectation.fulfill() | |
} | |
waitForExpectationsWithTimeout(5) { (error: NSError?) -> Void in | |
XCTAssert(itemsArray?.count == nil, "Array should be empty when \"items\" array is missing") | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment