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) {
26
26
}
27
27
28
28
func TestRedirectToCurrentSite (t * testing.T ) {
29
+ setting .IsInTesting = true
29
30
defer test .MockVariableValue (& setting .AppURL , "http://localhost:3000/sub/" )()
30
31
defer test .MockVariableValue (& setting .AppSubURL , "/sub" )()
31
32
cases := []struct {
@@ -40,7 +41,7 @@ func TestRedirectToCurrentSite(t *testing.T) {
40
41
t .Run (c .location , func (t * testing.T ) {
41
42
req := & http.Request {URL : & url.URL {Path : "/" }}
42
43
resp := httptest .NewRecorder ()
43
- base := NewBaseContext (resp , req )
44
+ base := NewBaseContextForTest (resp , req )
44
45
ctx := NewWebContext (base , nil , nil )
45
46
ctx .RedirectToCurrentSite (c .location )
46
47
redirect := test .RedirectURL (resp )
You can’t perform that action at this time.
0 commit comments