From a1ca5d964b96b3440256280534696db4579c0f7c Mon Sep 17 00:00:00 2001 From: Adam Young Date: Sun, 15 Sep 2024 21:00:24 +0100 Subject: [PATCH] Fix linting error --- Tests/TMDbTests/Extensions/JSONEncoder+TMDbTests.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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))