@@ -26,21 +26,21 @@ func TestAPISearchCodeNotLogin(t *testing.T) {
26
26
27
27
var apiCodeSearchResults api.CodeSearchResults
28
28
DecodeJSON (t , resp , & apiCodeSearchResults )
29
- assert .Equal (t , int64 (4 ), apiCodeSearchResults .TotalCount )
30
- assert .Len (t , apiCodeSearchResults .Items , 4 )
29
+ assert .Equal (t , int64 (1 ), apiCodeSearchResults .TotalCount )
30
+ assert .Len (t , apiCodeSearchResults .Items , 1 )
31
31
assert .Equal (t , "README.md" , apiCodeSearchResults .Items [0 ].Name )
32
32
assert .Equal (t , "README.md" , apiCodeSearchResults .Items [0 ].Path )
33
33
assert .Equal (t , "Markdown" , apiCodeSearchResults .Items [0 ].Language )
34
34
assert .Len (t , apiCodeSearchResults .Items [0 ].Lines , 2 )
35
35
assert .Equal (t , "\n " , apiCodeSearchResults .Items [0 ].Lines [0 ].RawContent )
36
36
assert .Equal (t , "Description for repo1" , apiCodeSearchResults .Items [0 ].Lines [1 ].RawContent )
37
37
38
- assert .Equal (t , setting .AppURL + "api/v1/repos/user2/git_hooks_test /contents/README.md?ref=65f1bf27bc3bf70f64657658635e66094edbcb4d" , apiCodeSearchResults .Items [0 ].URL )
39
- assert .Equal (t , setting .AppURL + "user2/git_hooks_test /blob/65f1bf27bc3bf70f64657658635e66094edbcb4d/README.md" , apiCodeSearchResults .Items [0 ].HTMLURL )
38
+ assert .Equal (t , setting .AppURL + "api/v1/repos/user2/repo1 /contents/README.md?ref=65f1bf27bc3bf70f64657658635e66094edbcb4d" , apiCodeSearchResults .Items [0 ].URL )
39
+ assert .Equal (t , setting .AppURL + "user2/repo1 /blob/65f1bf27bc3bf70f64657658635e66094edbcb4d/README.md" , apiCodeSearchResults .Items [0 ].HTMLURL )
40
40
41
- assert .Equal (t , int64 (37 ), apiCodeSearchResults .Items [0 ].Repository .ID )
41
+ assert .Equal (t , int64 (1 ), apiCodeSearchResults .Items [0 ].Repository .ID )
42
42
43
43
assert .Len (t , apiCodeSearchResults .Languages , 1 )
44
44
assert .Equal (t , "Markdown" , apiCodeSearchResults .Languages [0 ].Language )
45
- assert .Equal (t , 4 , apiCodeSearchResults .Languages [0 ].Count )
45
+ assert .Equal (t , 1 , apiCodeSearchResults .Languages [0 ].Count )
46
46
}
0 commit comments