diff options
| author | Amir Zarrinkafsh <nightah@me.com> | 2022-08-07 11:24:00 +1000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-08-07 11:24:00 +1000 |
| commit | 2d26b4e115813fae73b5ab74338b6de76017c641 (patch) | |
| tree | df7396f6a59e2f2ada08032f45b43f65d1d0e084 /internal/handlers/handler_firstfactor_test.go | |
| parent | c585e194996c464d5bdd1a271969836ce8eff7f2 (diff) | |
refactor: fix linter directives for go 1.19 and golangci-lint 1.48.0 (#3798)
Diffstat (limited to 'internal/handlers/handler_firstfactor_test.go')
| -rw-r--r-- | internal/handlers/handler_firstfactor_test.go | 36 |
1 files changed, 24 insertions, 12 deletions
diff --git a/internal/handlers/handler_firstfactor_test.go b/internal/handlers/handler_firstfactor_test.go index 55499f320..e2864279e 100644 --- a/internal/handlers/handler_firstfactor_test.go +++ b/internal/handlers/handler_firstfactor_test.go @@ -346,11 +346,14 @@ func (s *FirstFactorRedirectionSuite) TearDownTest() { } // When: -// 1/ the target url is unknown -// 2/ two_factor is disabled (no policy is set to two_factor) -// 3/ default_redirect_url is provided +// +// 1/ the target url is unknown +// 2/ two_factor is disabled (no policy is set to two_factor) +// 3/ default_redirect_url is provided +// // Then: -// the user should be redirected to the default url. +// +// the user should be redirected to the default url. func (s *FirstFactorRedirectionSuite) TestShouldRedirectToDefaultURLWhenNoTargetURLProvidedAndTwoFactorDisabled() { s.mock.Ctx.Request.SetBodyString(`{ "username": "test", @@ -365,11 +368,14 @@ func (s *FirstFactorRedirectionSuite) TestShouldRedirectToDefaultURLWhenNoTarget } // When: -// 1/ the target url is unsafe -// 2/ two_factor is disabled (no policy is set to two_factor) -// 3/ default_redirect_url is provided +// +// 1/ the target url is unsafe +// 2/ two_factor is disabled (no policy is set to two_factor) +// 3/ default_redirect_url is provided +// // Then: -// the user should be redirected to the default url. +// +// the user should be redirected to the default url. func (s *FirstFactorRedirectionSuite) TestShouldRedirectToDefaultURLWhenURLIsUnsafeAndTwoFactorDisabled() { s.mock.Ctx.Request.SetBodyString(`{ "username": "test", @@ -386,9 +392,12 @@ func (s *FirstFactorRedirectionSuite) TestShouldRedirectToDefaultURLWhenURLIsUns } // When: -// 1/ two_factor is enabled (default policy) +// +// 1/ two_factor is enabled (default policy) +// // Then: -// the user should receive 200 without redirection URL. +// +// the user should receive 200 without redirection URL. func (s *FirstFactorRedirectionSuite) TestShouldReply200WhenNoTargetURLProvidedAndTwoFactorEnabled() { s.mock.Ctx.Providers.Authorizer = authorization.NewAuthorizer(&schema.Configuration{ AccessControl: schema.AccessControlConfiguration{ @@ -409,9 +418,12 @@ func (s *FirstFactorRedirectionSuite) TestShouldReply200WhenNoTargetURLProvidedA } // When: -// 1/ two_factor is enabled (some rule) +// +// 1/ two_factor is enabled (some rule) +// // Then: -// the user should receive 200 without redirection URL. +// +// the user should receive 200 without redirection URL. func (s *FirstFactorRedirectionSuite) TestShouldReply200WhenUnsafeTargetURLProvidedAndTwoFactorEnabled() { s.mock.Ctx.Providers.Authorizer = authorization.NewAuthorizer(&schema.Configuration{ AccessControl: schema.AccessControlConfiguration{ |
