github.com/chasestarr/deis@v1.13.5-0.20170519182049-1d9e59fbdbfc/client/pkg/git/git_test.go (about)

     1  package git
     2  
     3  import (
     4  	"testing"
     5  )
     6  
     7  func TestRemoteURL(t *testing.T) {
     8  	t.Parallel()
     9  
    10  	actual := RemoteURL("example.com", "app")
    11  	expected := "ssh://git@example.com:2222/app.git"
    12  
    13  	if actual != expected {
    14  		t.Errorf("Expected %s, Got %s", expected, actual)
    15  	}
    16  
    17  	actual = RemoteURL("deis.10.245.1.3.xip.io:31350", "velcro-underdog")
    18  	expected = "ssh://git@deis.10.245.1.3.xip.io:2222/velcro-underdog.git"
    19  
    20  	if actual != expected {
    21  		t.Errorf("Expected %s, Got %s", expected, actual)
    22  	}
    23  }