Skip to content

Commit

Permalink
Refactor RelationshipsTest.testDecoder to not crash the process on …
Browse files Browse the repository at this point in the history
…failure (#50)
  • Loading branch information
regexident authored and MaxDesiatov committed Jan 2, 2019
1 parent aacaa69 commit 3b18f09
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion Tests/XMLCoderTests/RelationshipsTest.swift
Expand Up @@ -51,7 +51,13 @@ final class RelationshipsTest: XCTestCase {

let rels = try decoder.decode(Relationships.self, from: xml)

XCTAssertEqual(rels.items[0].id, "rId1")
XCTAssertEqual(rels.items.count, 3)

guard let relationship = rels.items.first else {
return
}

XCTAssertEqual(relationship.id, "rId1")
}

static var allTests = [
Expand Down

0 comments on commit 3b18f09

Please sign in to comment.