mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-05-21 17:24:10 +00:00
Fix redirect url of legacy commits route (#2825)
This commit is contained in:
parent
529f9d03ce
commit
1f04c00e2f
2 changed files with 4 additions and 12 deletions
|
@ -7,8 +7,10 @@ package integrations
|
|||
import (
|
||||
"fmt"
|
||||
"net/http"
|
||||
"path"
|
||||
"testing"
|
||||
|
||||
"code.gitea.io/gitea/modules/setting"
|
||||
api "code.gitea.io/sdk/gitea"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
|
@ -50,7 +52,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, redirectLink, RedirectURL(t, resp))
|
||||
assert.EqualValues(t, path.Join(setting.AppSubURL, redirectLink), RedirectURL(t, resp))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue