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

22 lines
465 B
Go
Raw Permalink Normal View History

2022-01-23 19:16:52 +08:00
package models
import (
2024-07-27 14:15:25 +08:00
"testing"
2022-01-23 19:16:52 +08:00
_ "github.com/go-sql-driver/mysql"
_ "github.com/iwind/TeaGo/bootstrap"
"github.com/iwind/TeaGo/dbs"
timeutil "github.com/iwind/TeaGo/utils/time"
)
func TestServerBillDAO_CreateOrUpdateServerBill(t *testing.T) {
var dao = NewServerBillDAO()
var tx *dbs.Tx
var month = timeutil.Format("Y02")
2022-01-23 20:16:06 +08:00
err := dao.CreateOrUpdateServerBill(tx, 1, 2, month, 4, 5, 6, 7, 95, "", 100)
2022-01-23 19:16:52 +08:00
if err != nil {
t.Fatal(err)
}
t.Log("ok")
}