Skip to content

Commit 476c7ec

Browse files
committed
admit in test that older open source foundation implementations of the localized error are not so good
1 parent cae14e9 commit 476c7ec

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Tests/JSONAPITests/Relationships/RelationshipTests.swift

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,11 @@ extension RelationshipTests {
255255
try decodedThrows(type: ToManyWithMeta.self,
256256
data: to_many_relationship_with_meta_no_data)
257257
) { error in
258-
XCTAssertEqual(error.localizedDescription, "The data couldn’t be read because it is missing.")
258+
let oldLinuxFoundationMsg = "The operation could not be completed. (SwiftError error 0.)"
259+
let newDesirableMsg = "The data couldn’t be read because it is missing."
260+
XCTAssert(
261+
error.localizedDescription == newDesirableMsg || error.localizedDescription == oldLinuxFoundationMsg
262+
)
259263
}
260264
}
261265
}

0 commit comments

Comments
 (0)