Skip to content

Commit

Permalink
accounts: increase parseURL test coverage (ethereum#25033)
Browse files Browse the repository at this point in the history
accounts/url: add test logic what check null string to parseURL()
  • Loading branch information
dbadoy authored and maoueh committed Nov 29, 2022
1 parent 49955b7 commit c237397
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions accounts/url_test.go
Expand Up @@ -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)
}
}
}

Expand Down

0 comments on commit c237397

Please sign in to comment.