Skip to content

Commit

Permalink
admit in test that older open source foundation implementations of th…
Browse files Browse the repository at this point in the history
…e localized error are not so good
  • Loading branch information
mattpolzin committed Mar 1, 2024
1 parent cae14e9 commit 476c7ec
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Tests/JSONAPITests/Relationships/RelationshipTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,11 @@ extension RelationshipTests {
try decodedThrows(type: ToManyWithMeta.self,
data: to_many_relationship_with_meta_no_data)
) { error in
XCTAssertEqual(error.localizedDescription, "The data couldn’t be read because it is missing.")
let oldLinuxFoundationMsg = "The operation could not be completed. (SwiftError error 0.)"
let newDesirableMsg = "The data couldn’t be read because it is missing."
XCTAssert(
error.localizedDescription == newDesirableMsg || error.localizedDescription == oldLinuxFoundationMsg
)
}
}
}
Expand Down

0 comments on commit 476c7ec

Please sign in to comment.