23 lines
438 B
Go
23 lines
438 B
Go
package tests
|
|
|
|
import (
|
|
"testing"
|
|
"github.com/leanote/leanote/app/db"
|
|
// . "github.com/leanote/leanote/app/lea"
|
|
"github.com/leanote/leanote/app/service"
|
|
// "gopkg.in/mgo.v2"
|
|
// "fmt"
|
|
)
|
|
|
|
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")
|
|
}
|
|
} |