- 整理partner.ReadStore
This commit is contained in:
@@ -4,6 +4,8 @@ import (
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"git.rosy.net.cn/jx-callback/business/jxutils/jxcontext"
|
||||
|
||||
"git.rosy.net.cn/baseapi/utils"
|
||||
"git.rosy.net.cn/jx-callback/business/model/dao"
|
||||
)
|
||||
@@ -14,7 +16,7 @@ const (
|
||||
)
|
||||
|
||||
func TestReadStore(t *testing.T) {
|
||||
result, err := new(PurchaseHandler).ReadStore(TestJdStoreNo)
|
||||
result, err := new(PurchaseHandler).ReadStore(jxcontext.AdminCtx, TestJdStoreNo)
|
||||
if err != nil {
|
||||
t.Fatal(err.Error())
|
||||
}
|
||||
@@ -23,7 +25,7 @@ func TestReadStore(t *testing.T) {
|
||||
|
||||
func TestUpdateStore(t *testing.T) {
|
||||
handler := new(PurchaseHandler)
|
||||
result, err := handler.ReadStore(TestJdStoreNo)
|
||||
result, err := handler.ReadStore(jxcontext.AdminCtx, TestJdStoreNo)
|
||||
|
||||
// result := &model.Store{}
|
||||
// result.ID = 100164
|
||||
@@ -40,7 +42,7 @@ func TestUpdateStore(t *testing.T) {
|
||||
}
|
||||
|
||||
// same
|
||||
result, err = handler.ReadStore(TestJdStoreNo)
|
||||
result, err = handler.ReadStore(jxcontext.AdminCtx, TestJdStoreNo)
|
||||
if result.Name != newName {
|
||||
t.Fatalf("result is not same, desired newName:%s, newName:%s", newName, result.Name)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user