forked from cerc-io/plugeth
accounts: increase parseURL test coverage (#25033)
accounts/url: add test logic what check null string to parseURL()
This commit is contained in:
parent
403624a4a1
commit
450f5da7e1
@ -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…
Reference in New Issue
Block a user