git-lfs/config/endpoint_test.go

24 lines
456 B
Go
Raw Normal View History

2016-08-15 21:23:36 +00:00
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)
}
}
}