pkg/urlutil: don't compare to bool

Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com>
This commit is contained in:
unclejack 2017-03-30 12:16:48 +03:00
parent 20d6f5c2a9
commit 90a44b875c
1 changed files with 6 additions and 6 deletions

View File

@ -29,13 +29,13 @@ var (
func TestValidGitTransport(t *testing.T) {
for _, url := range gitUrls {
if IsGitTransport(url) == false {
if !IsGitTransport(url) {
t.Fatalf("%q should be detected as valid Git prefix", url)
}
}
for _, url := range incompleteGitUrls {
if IsGitTransport(url) == true {
if IsGitTransport(url) {
t.Fatalf("%q should not be detected as valid Git prefix", url)
}
}
@ -43,19 +43,19 @@ func TestValidGitTransport(t *testing.T) {
func TestIsGIT(t *testing.T) {
for _, url := range gitUrls {
if IsGitURL(url) == false {
if !IsGitURL(url) {
t.Fatalf("%q should be detected as valid Git url", url)
}
}
for _, url := range incompleteGitUrls {
if IsGitURL(url) == false {
if !IsGitURL(url) {
t.Fatalf("%q should be detected as valid Git url", url)
}
}
for _, url := range invalidGitUrls {
if IsGitURL(url) == true {
if IsGitURL(url) {
t.Fatalf("%q should not be detected as valid Git prefix", url)
}
}
@ -63,7 +63,7 @@ func TestIsGIT(t *testing.T) {
func TestIsTransport(t *testing.T) {
for _, url := range transportUrls {
if IsTransportURL(url) == false {
if !IsTransportURL(url) {
t.Fatalf("%q should be detected as valid Transport url", url)
}
}