You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

36 lines
801 B

package dao
import (
"context"
"testing"
"github.com/smartystreets/goconvey/convey"
)
// go test -test.v -test.run TestDaoPrivilegeList
func TestDaoPrivilegeList(t *testing.T) {
var (
c = context.TODO()
)
convey.Convey("PrivilegeList", t, func(ctx convey.C) {
res, err := d.PrivilegeList(c)
ctx.Convey("Error should be nil", func(ctx convey.C) {
ctx.So(err, convey.ShouldBeNil)
})
ctx.Convey("res should not be nil", func(ctx convey.C) {
ctx.So(res, convey.ShouldNotBeNil)
})
})
}
func TestDaoPrivilegeResourcesList(t *testing.T) {
var (
c = context.TODO()
)
convey.Convey("PrivilegeResourcesList", t, func(ctx convey.C) {
_, err := d.PrivilegeResourcesList(c)
ctx.Convey("Error should be nil", func(ctx convey.C) {
ctx.So(err, convey.ShouldBeNil)
})
})
}