accounts: increase parseURL test coverage (#25033)

accounts/url: add test logic what check null string to parseURL()
pull/25044/head
Seungbae.yu 2 years ago committed by GitHub
parent 403624a4a1
commit 450f5da7e1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 7
      accounts/url_test.go

@ -32,9 +32,10 @@ func TestURLParsing(t *testing.T) {
t.Errorf("expected: %v, got: %v", "ethereum.org", url.Path)
}
_, err = parseURL("ethereum.org")
if err == nil {
t.Error("expected err, got: nil")
for _, u := range []string{"ethereum.org", ""} {
if _, err = parseURL(u); err == nil {
t.Errorf("input %v, expected err, got: nil", u)
}
}
}

Loading…
Cancel
Save