auth_test.go 331 B

12345678910111213141516
  1. package auth
  2. import (
  3. "testing"
  4. )
  5. func TestRepoName(t *testing.T) {
  6. if x := repoName("/yapp.ss.git/HEAD"); x != "yapp.ss.git" {
  7. t.Errorf("Should have been 'yapp.js.git' is '%s'", x)
  8. }
  9. if x := repoName("aarono/gogo-proxy/HEAD"); x != "aarono/gogo-proxy" {
  10. t.Errorf("Should have been 'aarono/gogo-proxy' is '%s'", x)
  11. }
  12. }