move tests to app/tests

This commit is contained in:
lealife
2015-09-16 11:14:29 +08:00
parent 7193ac6833
commit 4981d6aad4
4 changed files with 4 additions and 1 deletions

View File

@ -1,23 +0,0 @@
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")
}
}

View File

@ -1,14 +0,0 @@
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 TestDBConnect(t *testing.T) {
db.Init("mongodb://localhost:27017/leanote", "leanote")
}