@@ -16,17 +16,18 @@ func TestExploreUser(t *testing.T) {
16
16
defer tests .PrepareTestEnv (t )()
17
17
18
18
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=" },
24
24
}
25
25
for _ , c := range cases {
26
26
req := NewRequest (t , "GET" , "/explore/users?sort=" + c .sortOrder )
27
27
resp := MakeRequest (t , req , http .StatusOK )
28
28
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" )
30
31
assert .Equal (t , c .expected , href )
31
32
}
32
33
0 commit comments