github.com/saracen/git-lfs@v2.5.2+incompatible/lfsapi/endpoint_test.go (about)

     1  package lfsapi
     2  
     3  import (
     4  	"testing"
     5  )
     6  
     7  func TestNewEndpointFromCloneURLWithConfig(t *testing.T) {
     8  	expected := "https://foo/bar.git/info/lfs"
     9  	tests := []string{
    10  		"https://foo/bar",
    11  		"https://foo/bar/",
    12  		"https://foo/bar.git",
    13  		"https://foo/bar.git/",
    14  	}
    15  
    16  	finder := NewEndpointFinder(nil)
    17  	for _, actual := range tests {
    18  		e := finder.NewEndpointFromCloneURL(actual)
    19  		if e.Url != expected {
    20  			t.Errorf("%s returned bad endpoint url %s", actual, e.Url)
    21  		}
    22  	}
    23  }