diff options
| author | James Elliott <james-d-elliott@users.noreply.github.com> | 2023-04-15 15:03:14 +1000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-04-15 15:03:14 +1000 |
| commit | eaddf11df65ae996df46c388529bef09ac80a707 (patch) | |
| tree | a5574e5fa759319f3ed0bc7c04d08ca39f87a782 /internal/handlers/handler_firstfactor_test.go | |
| parent | d2cdbb23f3f5f26209b931c60bb6dee4c2229251 (diff) | |
refactor: http verbs etc (#5248)
Signed-off-by: James Elliott <james-d-elliott@users.noreply.github.com>
Diffstat (limited to 'internal/handlers/handler_firstfactor_test.go')
| -rw-r--r-- | internal/handlers/handler_firstfactor_test.go | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/internal/handlers/handler_firstfactor_test.go b/internal/handlers/handler_firstfactor_test.go index d6f8082ad..7c59857e7 100644 --- a/internal/handlers/handler_firstfactor_test.go +++ b/internal/handlers/handler_firstfactor_test.go @@ -7,6 +7,7 @@ import ( "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/suite" + "github.com/valyala/fasthttp" "github.com/authelia/authelia/v4/internal/authentication" "github.com/authelia/authelia/v4/internal/authorization" @@ -206,7 +207,7 @@ func (s *FirstFactorSuite) TestShouldAuthenticateUserWithRememberMeChecked() { FirstFactorPOST(nil)(s.mock.Ctx) // Respond with 200. - assert.Equal(s.T(), 200, s.mock.Ctx.Response.StatusCode()) + assert.Equal(s.T(), fasthttp.StatusOK, s.mock.Ctx.Response.StatusCode()) assert.Equal(s.T(), []byte("{\"status\":\"OK\"}"), s.mock.Ctx.Response.Body()) userSession, err := s.mock.Ctx.GetSession() @@ -248,7 +249,7 @@ func (s *FirstFactorSuite) TestShouldAuthenticateUserWithRememberMeUnchecked() { FirstFactorPOST(nil)(s.mock.Ctx) // Respond with 200. - assert.Equal(s.T(), 200, s.mock.Ctx.Response.StatusCode()) + assert.Equal(s.T(), fasthttp.StatusOK, s.mock.Ctx.Response.StatusCode()) assert.Equal(s.T(), []byte("{\"status\":\"OK\"}"), s.mock.Ctx.Response.Body()) userSession, err := s.mock.Ctx.GetSession() @@ -293,7 +294,7 @@ func (s *FirstFactorSuite) TestShouldSaveUsernameFromAuthenticationBackendInSess FirstFactorPOST(nil)(s.mock.Ctx) // Respond with 200. - assert.Equal(s.T(), 200, s.mock.Ctx.Response.StatusCode()) + assert.Equal(s.T(), fasthttp.StatusOK, s.mock.Ctx.Response.StatusCode()) assert.Equal(s.T(), []byte("{\"status\":\"OK\"}"), s.mock.Ctx.Response.Body()) userSession, err := s.mock.Ctx.GetSession() |
