diff --git a/crmEntity_test.go b/crmEntity_test.go index b0e5df5..40e4269 100644 --- a/crmEntity_test.go +++ b/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)