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 74c9230
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion Tests/JSONAPITests/Relationships/RelationshipTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,14 @@ 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 newLinuxFoundationMsg = "The operation could not be completed. The data is missing."
let newDesirableMsg = "The data couldn’t be read because it is missing."
XCTAssert(
error.localizedDescription == newDesirableMsg
|| error.localizedDescription == newLinuxFoundationMsg
|| error.localizedDescription == oldLinuxFoundationMsg
)
}
}
}
Expand Down

0 comments on commit 74c9230

Please sign in to comment.