Преглед изворни кода

using non-matching email to avoid conflicts with existing record.

master
Patrick Peng Sun пре 8 година
родитељ
комит
8caa512d97
1 измењених фајлова са 3 додато и 1 уклоњено
  1. +3
    -1
      crmEntity_test.go

+ 3
- 1
crmEntity_test.go Прегледај датотеку

@@ -49,7 +49,7 @@ func TestCreateDuplicate(t *testing.T) {
e.FirstName = "ff" + time.Now().Format("2006-jan-02 03:04:05")
e.LastName = "ll"
e.Password = "pp"
e.EmailAddress = "abc@gmail.com"
e.EmailAddress = "abc-non@gmail-exist.com"
e.Status = "New"
e.WechatHitxyID = "someopenid"
b, _ := json.Marshal(e)
@@ -67,6 +67,8 @@ func TestCreateDuplicate(t *testing.T) {
entity, err := crmCreateEntity("Lead", b)
AssertEqual(t, err == nil, false, "should have error for duplicates")
AssertEqual(t, isErrIndicateDuplicate(err), true, "the err should be duplicate error")
lead3 := entity.(crmdLead)
AssertEqual(t, lead1.ID, lead3.ID, "lead should have been created successfully")

//delete
deleted, _ := crmDeleteEntity("Lead", entity.(crmdLead).ID)

Loading…
Откажи
Сачувај