pet-house/core/server/operation/index_test.go

18 lines
342 B
Go

package operation
import (
"testing"
"pet-house.com/core/server/database"
)
func TestCreateOplog(t *testing.T) {
database.Instance().AutoMigrate(&Oplog{})
t.Run("test create op log", func(t *testing.T) {
record := &Oplog{}
if err := CreateOplog(record); err != nil {
t.Errorf("test create op log get %s", err.Error())
}
})
}