Ai
1 Star 1 Fork 0

zheng.cui/go-oauth2-server

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
database_test.go 479 Bytes
一键复制 编辑 原始数据 按行查看 历史
Richard Knop 提交于 2016-07-11 02:27 +08:00 . Massive refactoring.
package database_test
import (
"errors"
"testing"
"github.com/RichardKnop/go-oauth2-server/config"
"github.com/RichardKnop/go-oauth2-server/database"
"github.com/stretchr/testify/assert"
)
func TestNewDatabaseTypeNotSupported(t *testing.T) {
cnf := &config.Config{
Database: config.DatabaseConfig{
Type: "bogus",
},
}
_, err := database.NewDatabase(cnf)
if assert.NotNil(t, err) {
assert.Equal(t, errors.New("Database type bogus not suppported"), err)
}
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/ongo360/go-oauth2-server.git
git@gitee.com:ongo360/go-oauth2-server.git
ongo360
go-oauth2-server
go-oauth2-server
master

搜索帮助