Skip to content

Commit

Permalink
test: dialect not supported
Browse files Browse the repository at this point in the history
  • Loading branch information
aldy505 committed Jul 25, 2021
1 parent 1b25a09 commit ecefcdb
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions upsert_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
})
}

0 comments on commit ecefcdb

Please sign in to comment.