summaryrefslogtreecommitdiff
path: root/internal/handlers/handler_state_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/handlers/handler_state_test.go')
-rw-r--r--internal/handlers/handler_state_test.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/internal/handlers/handler_state_test.go b/internal/handlers/handler_state_test.go
index 72198357c..5552eeaae 100644
--- a/internal/handlers/handler_state_test.go
+++ b/internal/handlers/handler_state_test.go
@@ -29,7 +29,7 @@ func (s *StateGetSuite) TearDownTest() {
func (s *StateGetSuite) TestShouldReturnUsernameFromSession() {
userSession := s.mock.Ctx.GetSession()
userSession.Username = "username"
- s.mock.Ctx.SaveSession(userSession)
+ s.mock.Ctx.SaveSession(userSession) //nolint:errcheck // TODO: Legacy code, consider refactoring time permitting.
StateGet(s.mock.Ctx)
@@ -48,7 +48,7 @@ func (s *StateGetSuite) TestShouldReturnUsernameFromSession() {
}
actualBody := Response{}
- json.Unmarshal(s.mock.Ctx.Response.Body(), &actualBody)
+ json.Unmarshal(s.mock.Ctx.Response.Body(), &actualBody) //nolint:errcheck // TODO: Legacy code, consider refactoring time permitting.
assert.Equal(s.T(), 200, s.mock.Ctx.Response.StatusCode())
assert.Equal(s.T(), []byte("application/json"), s.mock.Ctx.Response.Header.ContentType())
assert.Equal(s.T(), expectedBody, actualBody)
@@ -57,7 +57,7 @@ func (s *StateGetSuite) TestShouldReturnUsernameFromSession() {
func (s *StateGetSuite) TestShouldReturnAuthenticationLevelFromSession() {
userSession := s.mock.Ctx.GetSession()
userSession.AuthenticationLevel = authentication.OneFactor
- s.mock.Ctx.SaveSession(userSession)
+ s.mock.Ctx.SaveSession(userSession) //nolint:errcheck // TODO: Legacy code, consider refactoring time permitting.
StateGet(s.mock.Ctx)
@@ -76,7 +76,7 @@ func (s *StateGetSuite) TestShouldReturnAuthenticationLevelFromSession() {
}
actualBody := Response{}
- json.Unmarshal(s.mock.Ctx.Response.Body(), &actualBody)
+ json.Unmarshal(s.mock.Ctx.Response.Body(), &actualBody) //nolint:errcheck // TODO: Legacy code, consider refactoring time permitting.
assert.Equal(s.T(), 200, s.mock.Ctx.Response.StatusCode())
assert.Equal(s.T(), []byte("application/json"), s.mock.Ctx.Response.Header.ContentType())
assert.Equal(s.T(), expectedBody, actualBody)