git-lfs/config/endpoint_test.go
2016-08-15 15:23:36 -06:00

24 lines
456 B
Go

package config
import (
"testing"
)
func TestNewEndpointFromCloneURLWithConfig(t *testing.T) {
expected := "https://foo/bar.git/info/lfs"
tests := []string{
"https://foo/bar",
"https://foo/bar/",
"https://foo/bar.git",
"https://foo/bar.git/",
}
cfg := New()
for _, actual := range tests {
e := NewEndpointFromCloneURLWithConfig(actual, cfg)
if e.Url != expected {
t.Errorf("%s returned bad endpoint url %s", actual, e.Url)
}
}
}