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)
|
t.Errorf("expected: %v, got: %v", "ethereum.org", url.Path)
|
||||||
}
|
}
|
||||||
|
|
||||||
_, err = parseURL("ethereum.org")
|
for _, u := range []string{"ethereum.org", ""} {
|
||||||
if err == nil {
|
if _, err = parseURL(u); err == nil {
|
||||||
t.Error("expected err, got: nil")
|
t.Errorf("input %v, expected err, got: nil", u)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user