internal: fix typo in session name constant

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer
2022-05-20 10:10:26 +02:00
parent 5bc893b890
commit a52638d898
9 changed files with 22 additions and 22 deletions

View File

@ -23,7 +23,7 @@ func TestRedirectToStart_Proxy(t *testing.T) {
loc, _ := rr.Result().Location()
assert.Equal(t, "https://test.goauthentik.io/outpost.goauthentik.io/start?rd=https%3A%2F%2Ftest.goauthentik.io%2Ffoo%2Fbar%2Fbaz", loc.String())
s, _ := a.sessions.Get(req, constants.SeesionName)
s, _ := a.sessions.Get(req, constants.SessionName)
assert.Equal(t, "https://test.goauthentik.io/foo/bar/baz", s.Values[constants.SessionRedirect])
}
@ -40,7 +40,7 @@ func TestRedirectToStart_Forward(t *testing.T) {
loc, _ := rr.Result().Location()
assert.Equal(t, "https://test.goauthentik.io/outpost.goauthentik.io/start?rd=https%3A%2F%2Ftest.goauthentik.io%2Ffoo%2Fbar%2Fbaz", loc.String())
s, _ := a.sessions.Get(req, constants.SeesionName)
s, _ := a.sessions.Get(req, constants.SessionName)
assert.Equal(t, "https://test.goauthentik.io/foo/bar/baz", s.Values[constants.SessionRedirect])
}
@ -58,7 +58,7 @@ func TestRedirectToStart_Forward_Domain_Invalid(t *testing.T) {
loc, _ := rr.Result().Location()
assert.Equal(t, "https://test.goauthentik.io/outpost.goauthentik.io/start?rd=https%3A%2F%2Ftest.goauthentik.io", loc.String())
s, _ := a.sessions.Get(req, constants.SeesionName)
s, _ := a.sessions.Get(req, constants.SessionName)
assert.Equal(t, "https://test.goauthentik.io", s.Values[constants.SessionRedirect])
}
@ -76,6 +76,6 @@ func TestRedirectToStart_Forward_Domain(t *testing.T) {
loc, _ := rr.Result().Location()
assert.Equal(t, "https://test.goauthentik.io/outpost.goauthentik.io/start?rd=https%3A%2F%2Ftest.goauthentik.io", loc.String())
s, _ := a.sessions.Get(req, constants.SeesionName)
s, _ := a.sessions.Get(req, constants.SessionName)
assert.Equal(t, "https://test.goauthentik.io", s.Values[constants.SessionRedirect])
}