aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorwxiaoguang <wxiaoguang@gmail.com>2024-03-20 13:56:42 +0800
committerGitHub <noreply@github.com>2024-03-20 13:56:42 +0800
commit4c476fa41dc29dc24afda0925023ae3d0b9707cd (patch)
tree671681b1fa68d8663e7d0822ef5c58fbcc0a394c /tests
parent35cfd98e121005f90f6d0d55d9a69e37d7990010 (diff)
downloadgitea-4c476fa41dc29dc24afda0925023ae3d0b9707cd.tar.gz
gitea-4c476fa41dc29dc24afda0925023ae3d0b9707cd.zip
Remove unnecessary ".Link" usages (#29909)
In HTML, `?key=val` already means "use the current link with new query parameters"
Diffstat (limited to 'tests')
-rw-r--r--tests/integration/explore_user_test.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/integration/explore_user_test.go b/tests/integration/explore_user_test.go
index 046caf378e..441d89cea5 100644
--- a/tests/integration/explore_user_test.go
+++ b/tests/integration/explore_user_test.go
@@ -16,17 +16,17 @@ func TestExploreUser(t *testing.T) {
defer tests.PrepareTestEnv(t)()
cases := []struct{ sortOrder, expected string }{
- {"", "/explore/users?sort=newest&q="},
- {"newest", "/explore/users?sort=newest&q="},
- {"oldest", "/explore/users?sort=oldest&q="},
- {"alphabetically", "/explore/users?sort=alphabetically&q="},
- {"reversealphabetically", "/explore/users?sort=reversealphabetically&q="},
+ {"", "?sort=newest&q="},
+ {"newest", "?sort=newest&q="},
+ {"oldest", "?sort=oldest&q="},
+ {"alphabetically", "?sort=alphabetically&q="},
+ {"reversealphabetically", "?sort=reversealphabetically&q="},
}
for _, c := range cases {
req := NewRequest(t, "GET", "/explore/users?sort="+c.sortOrder)
resp := MakeRequest(t, req, http.StatusOK)
h := NewHTMLParser(t, resp.Body)
- href, _ := h.Find(`.ui.dropdown .menu a.active.item[href^="/explore/users"]`).Attr("href")
+ href, _ := h.Find(`.ui.dropdown .menu a.active.item[href^="?sort="]`).Attr("href")
assert.Equal(t, c.expected, href)
}