diff options
| author | mo khan <mo@mokhan.ca> | 2025-04-15 14:47:07 -0600 |
|---|---|---|
| committer | mo khan <mo@mokhan.ca> | 2025-04-15 14:47:07 -0600 |
| commit | 58276879a5505f8e37aa8f81d577b477b5497a53 (patch) | |
| tree | bbd06b8fe1e89c6dc3bc7d93b0d1a5ff4354f427 /app/controllers/sessions/controller_test.go | |
| parent | b24e274e9931093ee65304e32ca1f309d2f01234 (diff) | |
feat: store tokens in sessio cookie
Diffstat (limited to 'app/controllers/sessions/controller_test.go')
| -rw-r--r-- | app/controllers/sessions/controller_test.go | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/app/controllers/sessions/controller_test.go b/app/controllers/sessions/controller_test.go index 1c4637d..bbe82bc 100644 --- a/app/controllers/sessions/controller_test.go +++ b/app/controllers/sessions/controller_test.go @@ -102,7 +102,14 @@ func TestSessions(t *testing.T) { t.Run("GET /session/callback", func(t *testing.T) { t.Run("with an invalid csrf token", func(t *testing.T) {}) - t.Run("with an invalid authorization code grant", func(t *testing.T) {}) + t.Run("with an invalid authorization code grant", func(t *testing.T) { + r, w := test.RequestResponse("GET", "/session/callback?code=invalid") + + mux.ServeHTTP(w, r) + + assert.Equal(t, http.StatusBadRequest, w.Code) + }) + t.Run("with a valid authorization code grant", func(t *testing.T) { r, w := test.RequestResponse("GET", "/session/callback?code=code") |
