File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ func TestRemoveSessionCookieHeader(t *testing.T) {
2626}
2727
2828func TestRedirectToCurrentSite (t * testing.T ) {
29+ setting .IsInTesting = true
2930 defer test .MockVariableValue (& setting .AppURL , "http://localhost:3000/sub/" )()
3031 defer test .MockVariableValue (& setting .AppSubURL , "/sub" )()
3132 cases := []struct {
@@ -40,7 +41,7 @@ func TestRedirectToCurrentSite(t *testing.T) {
4041 t .Run (c .location , func (t * testing.T ) {
4142 req := & http.Request {URL : & url.URL {Path : "/" }}
4243 resp := httptest .NewRecorder ()
43- base := NewBaseContext (resp , req )
44+ base := NewBaseContextForTest (resp , req )
4445 ctx := NewWebContext (base , nil , nil )
4546 ctx .RedirectToCurrentSite (c .location )
4647 redirect := test .RedirectURL (resp )
You can’t perform that action at this time.
0 commit comments