@@ -26,7 +26,6 @@ func TestAPIIssuesReactions(t *testing.T) {
26
26
session := loginUser (t , owner .Name )
27
27
token := getTokenForLoggedInUser (t , session )
28
28
29
- user1 := models .AssertExistsAndLoadBean (t , & models.User {ID : 1 }).(* models.User )
30
29
user2 := models .AssertExistsAndLoadBean (t , & models.User {ID : 2 }).(* models.User )
31
30
urlStr := fmt .Sprintf ("/api/v1/repos/%s/%s/issues/%d/reactions?token=%s" ,
32
31
owner .Name , issue .Repo .Name , issue .Index , token )
@@ -61,17 +60,12 @@ func TestAPIIssuesReactions(t *testing.T) {
61
60
DecodeJSON (t , resp , & apiReactions )
62
61
expectResponse := make (map [int ]api.ReactionResponse )
63
62
expectResponse [0 ] = api.ReactionResponse {
64
- User : user1 .APIFormat (),
65
- Reaction : "zzz" ,
66
- Created : time .Unix (1573248002 , 0 ),
67
- }
68
- expectResponse [1 ] = api.ReactionResponse {
69
63
User : user2 .APIFormat (),
70
64
Reaction : "eyes" ,
71
65
Created : time .Unix (1573248003 , 0 ),
72
66
}
73
- expectResponse [2 ] = apiNewReaction
74
- assert .Len (t , apiReactions , 3 )
67
+ expectResponse [1 ] = apiNewReaction
68
+ assert .Len (t , apiReactions , 2 )
75
69
for i , r := range apiReactions {
76
70
assert .Equal (t , expectResponse [i ].Reaction , r .Reaction )
77
71
assert .Equal (t , expectResponse [i ].Created .Unix (), r .Created .Unix ())
0 commit comments