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