Move tests out of separate package

This commit is contained in:
Adrian Macneil 2015-12-01 09:10:49 -08:00
parent 1d2493d2be
commit 275f5791f4
5 changed files with 36 additions and 62 deletions

View file

@ -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)
}