mirror of
https://github.com/groue/GRDB.swift
synced 2026-11-24 04:07:47 +00:00
25 lines
658 B
Swift
25 lines
658 B
Swift
import XCTest
|
|
#if USING_SQLCIPHER
|
|
import GRDBCipher
|
|
#elseif USING_CUSTOMSQLITE
|
|
import GRDBCustomSQLite
|
|
#else
|
|
import GRDB
|
|
#endif
|
|
|
|
class SQLTableBuilderTests: GRDBTestCase {
|
|
|
|
func testSQLTableBuilder() {
|
|
assertNoError {
|
|
let dbQueue = try makeDatabaseQueue()
|
|
try dbQueue.inDatabase { db in
|
|
try db.create(table: "test") { t in
|
|
t.column("id", .Integer).primaryKey()
|
|
t.column("name", .Text)
|
|
}
|
|
XCTAssertEqual(self.lastSQLQuery, "CREATE TABLE \"test\" (\"id\" INTEGER PRIMARY KEY, \"name\" TEXT)")
|
|
}
|
|
}
|
|
}
|
|
}
|