aboutsummaryrefslogtreecommitdiffstats
path: root/routers/web/auth/auth_test.go
diff options
context:
space:
mode:
authorwxiaoguang <wxiaoguang@gmail.com>2024-06-19 06:32:45 +0800
committerGitHub <noreply@github.com>2024-06-19 06:32:45 +0800
commit43c7a2e7b1c7fb8aa2347d82ad0a6886d6fad9c2 (patch)
treec98c2e1159ee02eb52282811f28a4c31ad222c67 /routers/web/auth/auth_test.go
parent17baf1af10de025a47ade1f16f1e5c51646d7fcf (diff)
downloadgitea-43c7a2e7b1c7fb8aa2347d82ad0a6886d6fad9c2.tar.gz
gitea-43c7a2e7b1c7fb8aa2347d82ad0a6886d6fad9c2.zip
Refactor names (#31405)
This PR only does "renaming": * `Route` should be `Router` (and chi router is also called "router") * `Params` should be `PathParam` (to distingush it from URL query param, and to match `FormString`) * Use lower case for private functions to avoid exposing or abusing
Diffstat (limited to 'routers/web/auth/auth_test.go')
-rw-r--r--routers/web/auth/auth_test.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/routers/web/auth/auth_test.go b/routers/web/auth/auth_test.go
index 45525a5c6f..cbcb2a5222 100644
--- a/routers/web/auth/auth_test.go
+++ b/routers/web/auth/auth_test.go
@@ -71,7 +71,7 @@ func TestSignUpOAuth2ButMissingFields(t *testing.T) {
mockOpt := contexttest.MockContextOption{SessionStore: session.NewMockStore("dummy-sid")}
ctx, resp := contexttest.MockContext(t, "/user/oauth2/dummy-auth-source/callback?code=dummy-code", mockOpt)
- ctx.SetParams("provider", "dummy-auth-source")
+ ctx.SetPathParam("provider", "dummy-auth-source")
SignInOAuthCallback(ctx)
assert.Equal(t, http.StatusSeeOther, resp.Code)
assert.Equal(t, "/user/link_account", test.RedirectURL(resp))