summaryrefslogtreecommitdiff
path: root/internal/handlers/handler_firstfactor_test.go
diff options
context:
space:
mode:
authorJames Elliott <james-d-elliott@users.noreply.github.com>2023-04-15 15:03:14 +1000
committerGitHub <noreply@github.com>2023-04-15 15:03:14 +1000
commiteaddf11df65ae996df46c388529bef09ac80a707 (patch)
treea5574e5fa759319f3ed0bc7c04d08ca39f87a782 /internal/handlers/handler_firstfactor_test.go
parentd2cdbb23f3f5f26209b931c60bb6dee4c2229251 (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.go7
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()