diff --git a/drift/test/database/statements/schema_test.dart b/drift/test/database/statements/schema_test.dart index 6300ec13..bec8e6d2 100644 --- a/drift/test/database/statements/schema_test.dart +++ b/drift/test/database/statements/schema_test.dart @@ -109,20 +109,26 @@ void main() { [])); }); - test('creates tables with custom types', () async { - await db.createMigrator().createTable(db.withCustomType); + group('creates tables with custom types', () { + test('sqlite3', () async { + await db.createMigrator().createTable(db.withCustomType); - verify(mockExecutor.runCustom( - 'CREATE TABLE IF NOT EXISTS "with_custom_type" ("id" text NOT NULL);', - [])); + verify(mockExecutor.runCustom( + 'CREATE TABLE IF NOT EXISTS "with_custom_type" ("id" text NOT NULL);', + [])); + }); - when(mockExecutor.dialect).thenReturn(SqlDialect.postgres); - await db.createMigrator().createTable(db.withCustomType); - verify(mockExecutor.runCustom( - 'CREATE TABLE IF NOT EXISTS "with_custom_type" ("id" uuid NOT NULL);', - [])); + test('postgres', () async { + when(mockExecutor.dialect).thenReturn(SqlDialect.postgres); + await db.createMigrator().createTable(db.withCustomType); + verify(mockExecutor.runCustom( + 'CREATE TABLE IF NOT EXISTS "with_custom_type" ("id" uuid NOT NULL);', + [])); + }); }); + test('creates tables with custom types', () async {}); + test('creates views through create()', () async { await db.createMigrator().create(db.categoryTodoCountView);