mirror of https://github.com/aldy505/bob.git
test: typo on table name
This commit is contained in:
parent
2d720a1cde
commit
18408e856b
|
@ -52,14 +52,14 @@ func TestCreate(t *testing.T) {
|
||||||
})
|
})
|
||||||
|
|
||||||
t.Run("should emit error for primary key not in columns", func(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" {
|
if err.Error() != "supplied primary column name doesn't exists on columns" {
|
||||||
t.Fatal("should throw an error, it didn't:", err.Error())
|
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) {
|
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" {
|
if err.Error() != "supplied unique column name doesn't exists on columns" {
|
||||||
t.Fatal("should throw an error, it didn't:", err.Error())
|
t.Fatal("should throw an error, it didn't:", err.Error())
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue