Files
leanote/app/tests/auth_test.go

24 lines
442 B
Go
Raw Normal View History

2015-09-11 18:31:37 +08:00
package tests
import (
"github.com/leanote/leanote/app/db"
2015-11-13 17:58:41 +08:00
"testing"
// . "github.com/leanote/leanote/app/lea"
2015-09-11 18:31:37 +08:00
"github.com/leanote/leanote/app/service"
2015-11-13 17:58:41 +08:00
// "gopkg.in/mgo.v2"
// "fmt"
2015-09-11 18:31:37 +08:00
)
func init() {
db.Init("mongodb://localhost:27017/leanote", "leanote")
service.InitService()
}
// 测试登录
func TestAuth(t *testing.T) {
_, err := service.AuthS.Login("admin", "abc123")
if err != nil {
t.Error("Admin User Auth Error")
}
2015-11-13 17:58:41 +08:00
}