Skip to content

Commit

Permalink
Fix: Add more readable assert
Browse files Browse the repository at this point in the history
Signed-off-by: Emanuel Pargov <[email protected]>
  • Loading branch information
bamzedev committed Aug 9, 2023
1 parent 32870fb commit fd45fe7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions account_id_unit_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ func TestUnitAccountIDPopulateFailForWrongMirrorHost(t *testing.T) {
require.NoError(t, err)
err = evmAddressAccountID.PopulateAccountNum(client)
require.Error(t, err)
require.True(t, strings.Contains(err.Error(), "no such host"))
require.True(t, strings.Contains(err.Error(), "no such host"), err.Error())
}

func TestUnitAccountIDPopulateFailWithNoMirror(t *testing.T) {
Expand All @@ -144,5 +144,5 @@ func TestUnitAccountIDPopulateFailWithNoMirror(t *testing.T) {
require.NoError(t, err)
err = evmAddressAccountID.PopulateAccountNum(client)
require.Error(t, err)
require.True(t, strings.Contains(err.Error(), "mirror node is not set"))
require.True(t, strings.Contains(err.Error(), "mirror node is not set"), err.Error())
}
4 changes: 2 additions & 2 deletions contract_id_unit_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ func TestUnitContractIDPopulateFailForWrongMirrorHost(t *testing.T) {
require.NoError(t, err)
err = evmAddressAccountID.PopulateAccountNum(client)
require.Error(t, err)
require.True(t, strings.Contains(err.Error(), "no such host"))
require.True(t, strings.Contains(err.Error(), "no such host"), err.Error())
}

func TestUnitContractIDPopulateFailWithNoMirror(t *testing.T) {
Expand All @@ -163,5 +163,5 @@ func TestUnitContractIDPopulateFailWithNoMirror(t *testing.T) {
require.NoError(t, err)
err = evmAddressAccountID.PopulateAccountNum(client)
require.Error(t, err)
require.True(t, strings.Contains(err.Error(), "mirror node is not set"))
require.True(t, strings.Contains(err.Error(), "mirror node is not set"), err.Error())
}

0 comments on commit fd45fe7

Please sign in to comment.