From 630260d0b18639b29e365a3281857f0c7e34b422 Mon Sep 17 00:00:00 2001 From: Andrey Beletsky Date: Thu, 23 May 2019 00:58:42 +0700 Subject: [PATCH] Fix AccountRemove test --- extras/jsonrpc/daemon_test.go | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/extras/jsonrpc/daemon_test.go b/extras/jsonrpc/daemon_test.go index e27d60c..92d728a 100644 --- a/extras/jsonrpc/daemon_test.go +++ b/extras/jsonrpc/daemon_test.go @@ -347,10 +347,14 @@ func TestClient_AccountRemove(t *testing.T) { if err != nil { t.Error(err) } + if removedAccount.ID != createdAccount.ID { + t.Error("accounts IDs mismatch") + } - _, err = d.SingleAccountList(createdAccount.ID) - if !strings.HasPrefix("Couldn't find account", err.Error()) { + account, err := d.SingleAccountList(createdAccount.ID) + if !strings.HasPrefix(err.Error(), "Error in daemon: Couldn't find account") { t.Error("account was not removed") } - prettyPrint(*removedAccount) + fmt.Println(err.Error()) + prettyPrint(*account) }