Skip to content

Commit 450f5da

Browse files
authored
accounts: increase parseURL test coverage (ethereum#25033)
accounts/url: add test logic what check null string to parseURL()
1 parent 403624a commit 450f5da

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

accounts/url_test.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,10 @@ func TestURLParsing(t *testing.T) {
3232
t.Errorf("expected: %v, got: %v", "ethereum.org", url.Path)
3333
}
3434

35-
_, err = parseURL("ethereum.org")
36-
if err == nil {
37-
t.Error("expected err, got: nil")
35+
for _, u := range []string{"ethereum.org", ""} {
36+
if _, err = parseURL(u); err == nil {
37+
t.Errorf("input %v, expected err, got: nil", u)
38+
}
3839
}
3940
}
4041

0 commit comments

Comments
 (0)