package elm

import (
	"errors"
	"git.rosy.net.cn/baseapi/utils"
	_ "git.rosy.net.cn/jx-callback/business/jxcallback/orderman"
	"git.rosy.net.cn/jx-callback/globals/testinit"
	"testing"
)

func init() {
	testinit.Init()
}

func TestGetOrder(t *testing.T) {
	orderID := "3025427524410871880"
	order, err := new(PurchaseHandler).GetOrder("", orderID)
	if err != nil {
		t.Fatal(err.Error())
	}
	if order.VendorOrderID != orderID {
		t.Fatal(err.Error())
	}
}

func TestQQQQ(t *testing.T) {
	err := errors.New("无需切自配送 level:0, code:301251")
	dd := utils.IsErrMatch(err, "301251", nil)
	t.Log(dd)
}
