From 18408e856b57c80a2237e24a976eccda810d9cb6 Mon Sep 17 00:00:00 2001 From: Reinaldy Rafli Date: Thu, 24 Jun 2021 15:18:23 +0700 Subject: [PATCH] test: typo on table name --- create_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/create_test.go b/create_test.go index debe4c5..2d727c8 100644 --- a/create_test.go +++ b/create_test.go @@ -52,14 +52,14 @@ func TestCreate(t *testing.T) { }) t.Run("should emit error for primary key not in columns", func(t *testing.T) { - _, _, err := bob.CreateTable("").Columns("name").Types("text").Primary("id").ToSql() + _, _, err := bob.CreateTable("users").Columns("name").Types("text").Primary("id").ToSql() if err.Error() != "supplied primary column name doesn't exists on columns" { t.Fatal("should throw an error, it didn't:", err.Error()) } }) t.Run("should emit error for unique key not in columns", func(t *testing.T) { - _, _, err := bob.CreateTable("").Columns("name").Types("text").Unique("id").ToSql() + _, _, err := bob.CreateTable("users").Columns("name").Types("text").Unique("id").ToSql() if err.Error() != "supplied unique column name doesn't exists on columns" { t.Fatal("should throw an error, it didn't:", err.Error()) }