Skip to content

Commit 9c1ba01

Browse files
committed
fix tests
1 parent 07c23c9 commit 9c1ba01

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

tests/integration/explore_user_test.go

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,18 @@ func TestExploreUser(t *testing.T) {
1616
defer tests.PrepareTestEnv(t)()
1717

1818
cases := []struct{ sortOrder, expected string }{
19-
{"", "/explore/users?sort=newest&q="},
20-
{"newest", "/explore/users?sort=newest&q="},
21-
{"oldest", "/explore/users?sort=oldest&q="},
22-
{"alphabetically", "/explore/users?sort=alphabetically&q="},
23-
{"reversealphabetically", "/explore/users?sort=reversealphabetically&q="},
19+
{"", "?sort=newest&q="},
20+
{"newest", "?sort=newest&q="},
21+
{"oldest", "?sort=oldest&q="},
22+
{"alphabetically", "?sort=alphabetically&q="},
23+
{"reversealphabetically", "?sort=reversealphabetically&q="},
2424
}
2525
for _, c := range cases {
2626
req := NewRequest(t, "GET", "/explore/users?sort="+c.sortOrder)
2727
resp := MakeRequest(t, req, http.StatusOK)
2828
h := NewHTMLParser(t, resp.Body)
29-
href, _ := h.Find(`.ui.dropdown .menu a.active.item[href^="/explore/users"]`).Attr("href")
29+
println(resp.Body)
30+
href, _ := h.Find(`.ui.dropdown .menu a.active.item[href^="?sort="]`).Attr("href")
3031
assert.Equal(t, c.expected, href)
3132
}
3233

0 commit comments

Comments
 (0)