2017-10-12 15:25:00 +02:00
|
|
|
package database
|
|
|
|
|
|
|
|
import (
|
|
|
|
"testing"
|
|
|
|
|
|
|
|
"github.com/stretchr/testify/assert"
|
|
|
|
)
|
|
|
|
|
2017-12-31 05:26:17 +01:00
|
|
|
func TestRegister(t *testing.T) {
|
2017-10-12 15:25:00 +02:00
|
|
|
assert := assert.New(t)
|
|
|
|
assert.Len(Adapters, 0)
|
|
|
|
|
2017-12-31 05:26:17 +01:00
|
|
|
RegisterAdapter("blub", func(config map[string]interface{}) (Connection, error) {
|
2017-10-12 15:25:00 +02:00
|
|
|
return nil, nil
|
|
|
|
})
|
|
|
|
|
|
|
|
assert.Len(Adapters, 1)
|
|
|
|
}
|