(t *testing.T)
| 106 | } |
| 107 | |
| 108 | func TestRepositoryPath(t *testing.T) { |
| 109 | if runtime.GOOS == "windows" { |
| 110 | t.Skip("Skipping testing on Windows") |
| 111 | return |
| 112 | } |
| 113 | |
| 114 | conf.SetMockRepository(t, |
| 115 | conf.RepositoryOpts{ |
| 116 | Root: "/home/git/gogs-repositories", |
| 117 | }, |
| 118 | ) |
| 119 | |
| 120 | got := RepositoryPath("alice", "example") |
| 121 | want := "/home/git/gogs-repositories/alice/example.git" |
| 122 | assert.Equal(t, want, got) |
| 123 | } |
| 124 | |
| 125 | func TestRepositoryLocalPath(t *testing.T) { |
| 126 | if runtime.GOOS == "windows" { |
nothing calls this directly
no test coverage detected