Last active
March 28, 2020 13:01
-
-
Save tedgonzalez/d2178c35e8d14898b93fadf9c4319f81 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 testDecodingUnknownOrderItemsThrowsAnError() throws { | |
| let givenJsonData = #""" | |
| [ | |
| "unknownDelivery": "unknownValue" | |
| ] | |
| """#.data(using: .utf8)! | |
| XCTAssertThrowsError(try decoder.decode([OrderItem].self, from: givenJsonData)) | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment