test: dialect not supported

This commit is contained in:
Reinaldy Rafli 2021-07-25 14:01:07 +07:00
parent 1b25a09302
commit ecefcdb710
1 changed files with 8 additions and 0 deletions

View File

@ -144,4 +144,12 @@ func TestUpsert(t *testing.T) {
t.Error(err)
}
})
t.Run("should emit error if dialect not supported", func(t *testing.T) {
_, _, err := bob.Upsert("users", 100).Columns("name", "email").Values("James", "james@mail.com").Replace("name", "Thomas").ToSql()
if err.Error() != "provided database dialect is not supported" {
t.Log(err.Error())
t.Error(err)
}
})
}