Unit tests for routers/repo/issue_label (#3198)

This commit is contained in:
Ethan Koenig 2017-12-15 13:11:02 -08:00 committed by Lauris BH
parent bde0409433
commit befa7445d2
15 changed files with 231 additions and 42 deletions

View file

@ -11,6 +11,7 @@ import (
"testing"
"code.gitea.io/gitea/modules/setting"
"code.gitea.io/gitea/modules/test"
api "code.gitea.io/sdk/gitea"
"github.com/stretchr/testify/assert"
@ -54,7 +55,7 @@ func TestRedirectsNoLogin(t *testing.T) {
for link, redirectLink := range redirects {
req := NewRequest(t, "GET", link)
resp := MakeRequest(t, req, http.StatusFound)
assert.EqualValues(t, path.Join(setting.AppSubURL, redirectLink), RedirectURL(t, resp))
assert.EqualValues(t, path.Join(setting.AppSubURL, redirectLink), test.RedirectURL(resp))
}
}