diff --git a/Tests/TMDbTests/Extensions/JSONEncoder+TMDbTests.swift b/Tests/TMDbTests/Extensions/JSONEncoder+TMDbTests.swift index 0058c21f..dde6138f 100644 --- a/Tests/TMDbTests/Extensions/JSONEncoder+TMDbTests.swift +++ b/Tests/TMDbTests/Extensions/JSONEncoder+TMDbTests.swift @@ -44,7 +44,7 @@ final class JSONEncoderTMDbTests: XCTestCase { let expectedDataOfBirthResult = "\"date_of_birth\":\"1990-01-02\"" let data = try jsonEncoder.encode(value) - let dataAsString = try XCTUnwrap(String(decoding: data, as: UTF8.self)) + let dataAsString = try XCTUnwrap(String(data: data, encoding: .utf8)) XCTAssertTrue(dataAsString.contains(expectedIDResult)) XCTAssertTrue(dataAsString.contains(expectedFirstNameResult))