diff options
Diffstat (limited to 'modules/migrations/github_test.go')
-rw-r--r-- | modules/migrations/github_test.go | 89 |
1 files changed, 56 insertions, 33 deletions
diff --git a/modules/migrations/github_test.go b/modules/migrations/github_test.go index bf71ab4756..10943e4019 100644 --- a/modules/migrations/github_test.go +++ b/modules/migrations/github_test.go @@ -170,14 +170,12 @@ func TestGitHubDownloadRepo(t *testing.T) { Description: "Good for newcomers", }, }, - Reactions: &base.Reactions{ - TotalCount: 1, - PlusOne: 1, - MinusOne: 0, - Laugh: 0, - Confused: 0, - Heart: 0, - Hooray: 0, + Reactions: []*base.Reaction{ + { + UserID: 1669571, + UserName: "mrsdizzie", + Content: "+1", + }, }, Closed: &closed1, }, @@ -198,14 +196,37 @@ func TestGitHubDownloadRepo(t *testing.T) { Description: "This issue or pull request already exists", }, }, - Reactions: &base.Reactions{ - TotalCount: 6, - PlusOne: 1, - MinusOne: 1, - Laugh: 1, - Confused: 1, - Heart: 1, - Hooray: 1, + Reactions: []*base.Reaction{ + { + UserID: 1669571, + UserName: "mrsdizzie", + Content: "heart", + }, + { + UserID: 1669571, + UserName: "mrsdizzie", + Content: "laugh", + }, + { + UserID: 1669571, + UserName: "mrsdizzie", + Content: "-1", + }, + { + UserID: 1669571, + UserName: "mrsdizzie", + Content: "confused", + }, + { + UserID: 1669571, + UserName: "mrsdizzie", + Content: "hooray", + }, + { + UserID: 1669571, + UserName: "mrsdizzie", + Content: "+1", + }, }, Closed: &closed2, }, @@ -223,14 +244,12 @@ func TestGitHubDownloadRepo(t *testing.T) { Created: time.Date(2019, 11, 12, 21, 0, 13, 0, time.UTC), Updated: time.Date(2019, 11, 12, 21, 0, 13, 0, time.UTC), Content: "This is a comment", - Reactions: &base.Reactions{ - TotalCount: 1, - PlusOne: 1, - MinusOne: 0, - Laugh: 0, - Confused: 0, - Heart: 0, - Hooray: 0, + Reactions: []*base.Reaction{ + { + UserID: 1669571, + UserName: "mrsdizzie", + Content: "+1", + }, }, }, { @@ -240,15 +259,7 @@ func TestGitHubDownloadRepo(t *testing.T) { Created: time.Date(2019, 11, 12, 22, 7, 14, 0, time.UTC), Updated: time.Date(2019, 11, 12, 22, 7, 14, 0, time.UTC), Content: "A second comment", - Reactions: &base.Reactions{ - TotalCount: 0, - PlusOne: 0, - MinusOne: 0, - Laugh: 0, - Confused: 0, - Heart: 0, - Hooray: 0, - }, + Reactions: nil, }, }, comments[:2]) @@ -331,6 +342,18 @@ func TestGitHubDownloadRepo(t *testing.T) { }, Merged: false, MergeCommitSHA: "565d1208f5fffdc1c5ae1a2436491eb9a5e4ebae", + Reactions: []*base.Reaction{ + { + UserID: 81045, + UserName: "lunny", + Content: "heart", + }, + { + UserID: 81045, + UserName: "lunny", + Content: "+1", + }, + }, }, }, prs) } |