diff options
Diffstat (limited to 'app/controllers/sessions')
| -rw-r--r-- | app/controllers/sessions/controller_test.go | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/app/controllers/sessions/controller_test.go b/app/controllers/sessions/controller_test.go index a5167cc..160594b 100644 --- a/app/controllers/sessions/controller_test.go +++ b/app/controllers/sessions/controller_test.go @@ -5,9 +5,7 @@ import ( "encoding/json" "net/http" "net/url" - "strconv" "testing" - "time" "github.com/oauth2-proxy/mockoidc" "github.com/stretchr/testify/assert" @@ -71,13 +69,8 @@ func TestSessions(t *testing.T) { }) t.Run("with a valid authorization code grant", func(t *testing.T) { - code := strconv.FormatInt(time.Now().Unix(), 10) user := mockoidc.DefaultUser() - srv.QueueUser(user) - srv.QueueCode(code) - - _, err := http.Get(srv.AuthCodeURL("state")) - require.NoError(srv, err) + code := srv.CreateAuthorizationCodeFor(user) r, w := test.RequestResponse("GET", "/session/callback?code="+code) |
