-
-
Notifications
You must be signed in to change notification settings - Fork 108
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: date formatter breaking change (#435)
- Loading branch information
Showing
7 changed files
with
65 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
// | ||
// JSONTests.swift | ||
// | ||
// | ||
// Created by Guilherme Souza on 01/07/24. | ||
// | ||
|
||
@testable import PostgREST | ||
import XCTest | ||
|
||
final class JSONTests: XCTestCase { | ||
func testDecodeJSON() throws { | ||
let json = """ | ||
{ | ||
"created_at": "2024-06-15T18:12:04+00:00" | ||
} | ||
""".data(using: .utf8)! | ||
|
||
struct Value: Decodable { | ||
var createdAt: Date | ||
|
||
enum CodingKeys: String, CodingKey { | ||
case createdAt = "created_at" | ||
} | ||
} | ||
_ = try PostgrestClient.Configuration.jsonDecoder.decode(Value.self, from: json) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters