This commit is contained in:
Shawn Smith
2015-05-11 23:46:08 +09:00
parent 5699054319
commit b976bca91c

18
handlers/checks_test.go Normal file
View File

@@ -0,0 +1,18 @@
package handlers
import "testing"
var dirNameTests = []struct {
url string
want string
}{
{"https://github.com/foo/bar", "repos/src/github.com/foo/bar"},
}
func TestDirName(t *testing.T) {
for _, tt := range dirNameTests {
if got := dirName(tt.url); got != tt.want {
t.Errorf("dirName(%q) = %q, want %q", tt.url, got, tt.want)
}
}
}