Files
EdgeAPI/internal/db/models/user_dao_test.go

22 lines
458 B
Go
Raw Normal View History

2020-07-22 22:17:53 +08:00
package models
import (
2022-08-28 17:01:09 +08:00
"github.com/TeaOSLab/EdgeCommon/pkg/userconfigs"
2020-07-22 22:17:53 +08:00
_ "github.com/go-sql-driver/mysql"
2022-08-28 17:01:09 +08:00
_ "github.com/iwind/TeaGo/bootstrap"
"github.com/iwind/TeaGo/dbs"
"testing"
2020-07-22 22:17:53 +08:00
)
2022-08-28 17:01:09 +08:00
func TestUserDAO_UpdateUserFeatures(t *testing.T) {
var dao = NewUserDAO()
var tx *dbs.Tx
err := dao.UpdateUsersFeatures(tx, []string{
userconfigs.UserFeatureCodeFinance,
userconfigs.UserFeatureCodeServerACME,
}, false)
if err != nil {
t.Fatal(err)
}
}