mirror of
https://github.com/TECHNOFAB11/dbmate.git
synced 2025-12-12 16:10:03 +01:00
Move tests out of separate package
This commit is contained in:
parent
1d2493d2be
commit
275f5791f4
5 changed files with 36 additions and 62 deletions
|
|
@ -1,21 +1,20 @@
|
|||
package driver_test
|
||||
package driver
|
||||
|
||||
import (
|
||||
"github.com/adrianmacneil/dbmate/driver"
|
||||
"github.com/adrianmacneil/dbmate/driver/postgres"
|
||||
"github.com/stretchr/testify/require"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestGet_Postgres(t *testing.T) {
|
||||
drv, err := driver.Get("postgres")
|
||||
drv, err := Get("postgres")
|
||||
require.Nil(t, err)
|
||||
_, ok := drv.(postgres.Driver)
|
||||
require.Equal(t, true, ok)
|
||||
}
|
||||
|
||||
func TestGet_Error(t *testing.T) {
|
||||
drv, err := driver.Get("foo")
|
||||
drv, err := Get("foo")
|
||||
require.Equal(t, "Unknown driver: foo", err.Error())
|
||||
require.Nil(t, drv)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue