@@ -16,17 +16,17 @@ 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+ href , _ := h .Find (`.ui.dropdown .menu a.active.item[href^="?sort= "]` ).Attr ("href" )
3030 assert .Equal (t , c .expected , href )
3131 }
3232
0 commit comments