From 529a2553d7e2e5afc98802b4171547e4d7345848 Mon Sep 17 00:00:00 2001 From: "Seungbae.yu" <72970043+dbadoy@users.noreply.github.com> Date: Tue, 7 Jun 2022 19:46:27 +0900 Subject: [PATCH] accounts: increase parseURL test coverage (#25033) accounts/url: add test logic what check null string to parseURL() --- accounts/url_test.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/accounts/url_test.go b/accounts/url_test.go index bd6f35fa2a0e..239aa06d227b 100644 --- a/accounts/url_test.go +++ b/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) + } } }