Skip to content

Commit c5b7258

Browse files
authored
Fixing missing date in upsert test
1 parent 4ea6f4e commit c5b7258

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Tests/SQLiteTests/QueryTests.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -280,10 +280,10 @@ class QueryTests : XCTestCase {
280280
func test_upsert_encodable() throws {
281281
let emails = Table("emails")
282282
let string = Expression<String>("string")
283-
let value = TestCodable(int: 1, string: "2", bool: true, float: 3, double: 4, optional: nil, sub: nil)
283+
let value = TestCodable(int: 1, string: "2", bool: true, float: 3, double: 4, date: Date(timeIntervalSince1970: 0), optional: nil, sub: nil)
284284
let insert = try emails.upsert(value, onConflictOf: string)
285285
AssertSQL(
286-
"INSERT INTO \"emails\" (\"int\", \"string\", \"bool\", \"float\", \"double\") VALUES (1, '2', 1, 3.0, 4.0) ON CONFLICT (\"string\") DO UPDATE SET \"int\" = \"excluded\".\"int\", \"bool\" = \"excluded\".\"bool\", \"float\" = \"excluded\".\"float\", \"double\" = \"excluded\".\"double\"",
286+
"INSERT INTO \"emails\" (\"int\", \"string\", \"bool\", \"float\", \"double\", \"date\") VALUES (1, '2', 1, 3.0, 4.0, '1970-01-01T00:00:00.000') ON CONFLICT (\"string\") DO UPDATE SET \"int\" = \"excluded\".\"int\", \"bool\" = \"excluded\".\"bool\", \"float\" = \"excluded\".\"float\", \"double\" = \"excluded\".\"double\"",
287287
insert
288288
)
289289
}

0 commit comments

Comments
 (0)