Skip to content

Commit

Permalink
Numptie
Browse files Browse the repository at this point in the history
  • Loading branch information
0xTim committed Jan 20, 2025
1 parent 7a3c492 commit 0c31c4d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Tests/FluentPostgresDriverTests/FluentPostgresDriverTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ final class FluentPostgresDriverTests: XCTestCase {
func prepare(on database: any Database) async throws {
try await database.schema("orgs")
.field("id", .int, .identifier(auto: true))
.field("date", .date, .required)
.field("date", .datetime, .required)
.create()
}

Expand All @@ -272,13 +272,13 @@ final class FluentPostgresDriverTests: XCTestCase {
do {
let date = Date()
let new = Event()
XCTAssertEqual(date, date)
XCTAssertEqual(date.timeIntervalSince1970, date.timeIntervalSince1970)
new.date = date
XCTAssertEqual(new.date, date)
XCTAssertEqual(new.date.timeIntervalSince1970, date.timeIntervalSince1970)
try await new.save(on: self.db)
XCTAssertEqual(new.date, date)
XCTAssertEqual(new.date.timeIntervalSince1970, date.timeIntervalSince1970)
let fetched = try await Event.query(on: self.db).first()!
XCTAssertEqual(fetched.date, date)
XCTAssertEqual(fetched.date.timeIntervalSince1970, date.timeIntervalSince1970)
} catch {
try? await CreateEvent().revert(on: self.db)
throw error
Expand Down

0 comments on commit 0c31c4d

Please sign in to comment.