mirror of
https://github.com/Luzifer/twitch-bot.git
synced 2024-12-30 00:21:16 +00:00
15 lines
302 B
Go
15 lines
302 B
Go
package database
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/require"
|
|
)
|
|
|
|
func GetTestDatabase(t *testing.T) Connector {
|
|
dbc, err := New("sqlite", "file::memory:?cache=shared", "encpass")
|
|
require.NoError(t, err, "creating database connector")
|
|
t.Cleanup(func() { dbc.Close() })
|
|
|
|
return dbc
|
|
}
|