package main

import (
	"testing"
	. "github.com/onsi/gomega"
)

func TestNewURL(t *testing.T) {
	httpsUrl, err := NewURL("https://github.com/motemen/pusheen-explorer")
	Expect(httpsUrl.String()).To(Equal("https://github.com/motemen/pusheen-explorer"))
	Expect(err).To(BeNil())

	sshUrl, err := NewURL("git@github.com:motemen/pusheen-explorer.git")
	Expect(sshUrl.String()).To(Equal("ssh://git@github.com/motemen/pusheen-explorer.git"))
	Expect(err).To(BeNil())
}

package main

import (
	"testing"
	. "github.com/onsi/gomega"
)

func TestNewURL(t *testing.T) {
	url, err := NewURL("https://github.com/motemen/pusheen-explorer")
	Expect(url.String()).To(Equal("https://github.com/motemen/pusheen-explorer"))
	Expect(err).To(BeNil())

	url, err = NewURL("git@github.com:motemen/pusheen-explorer.git")
	Expect(url.Host).To(Equal("ssh://git@github.com/motemen/pusheen-explorer.git"))
	Expect(err).To(BeNil())
}

--- 
+++ 
@@ -6,11 +6,11 @@
 )
 
 func TestNewURL(t *testing.T) {
-	url, err := NewURL("https://github.com/motemen/pusheen-explorer")
-	Expect(url.String()).To(Equal("https://github.com/motemen/pusheen-explorer"))
+	httpsUrl, err := NewURL("https://github.com/motemen/pusheen-explorer")
+	Expect(httpsUrl.String()).To(Equal("https://github.com/motemen/pusheen-explorer"))
 	Expect(err).To(BeNil())
 
-	url, err = NewURL("git@github.com:motemen/pusheen-explorer.git")
-	Expect(url.Host).To(Equal("ssh://git@github.com/motemen/pusheen-explorer.git"))
+	sshUrl, err := NewURL("git@github.com:motemen/pusheen-explorer.git")
+	Expect(sshUrl.String()).To(Equal("ssh://git@github.com/motemen/pusheen-explorer.git"))
 	Expect(err).To(BeNil())
 }
Fix test to use `url.String()`
