@@ -12,6 +12,7 @@ import (
12
12
repo_model "code.gitea.io/gitea/models/repo"
13
13
"code.gitea.io/gitea/models/unittest"
14
14
user_model "code.gitea.io/gitea/models/user"
15
+ issues_model "code.gitea.io/gitea/models/issues"
15
16
16
17
"github.com/stretchr/testify/assert"
17
18
)
@@ -42,7 +43,7 @@ func assertCreateIssues(t *testing.T, isPull bool) {
42
43
label := unittest .AssertExistsAndLoadBean (t , & Label {ID : 1 }).(* Label )
43
44
milestone := unittest .AssertExistsAndLoadBean (t , & Milestone {ID : 1 }).(* Milestone )
44
45
assert .EqualValues (t , milestone .ID , 1 )
45
- reaction := & Reaction {
46
+ reaction := & issues_model. Reaction {
46
47
Type : "heart" ,
47
48
UserID : owner .ID ,
48
49
}
@@ -60,7 +61,7 @@ func assertCreateIssues(t *testing.T, isPull bool) {
60
61
Poster : owner ,
61
62
IsClosed : true ,
62
63
Labels : []* Label {label },
63
- Reactions : []* Reaction {reaction },
64
+ Reactions : []* issues_model. Reaction {reaction },
64
65
ForeignReference : & foreignreference.ForeignReference {
65
66
ForeignIndex : strconv .FormatInt (foreignIndex , 10 ),
66
67
RepoID : repo .ID ,
@@ -75,7 +76,7 @@ func assertCreateIssues(t *testing.T, isPull bool) {
75
76
err = i .LoadAttributes ()
76
77
assert .NoError (t , err )
77
78
assert .EqualValues (t , strconv .FormatInt (foreignIndex , 10 ), i .ForeignReference .ForeignIndex )
78
- unittest .AssertExistsAndLoadBean (t , & Reaction {Type : "heart" , UserID : owner .ID , IssueID : i .ID })
79
+ unittest .AssertExistsAndLoadBean (t , & issues_model. Reaction {Type : "heart" , UserID : owner .ID , IssueID : i .ID })
79
80
}
80
81
81
82
func TestMigrate_CreateIssuesIsPullFalse (t * testing.T ) {
@@ -91,7 +92,7 @@ func TestMigrate_InsertIssueComments(t *testing.T) {
91
92
issue := unittest .AssertExistsAndLoadBean (t , & Issue {ID : 1 }).(* Issue )
92
93
_ = issue .LoadRepo ()
93
94
owner := unittest .AssertExistsAndLoadBean (t , & user_model.User {ID : issue .Repo .OwnerID }).(* user_model.User )
94
- reaction := & Reaction {
95
+ reaction := & issues_model. Reaction {
95
96
Type : "heart" ,
96
97
UserID : owner .ID ,
97
98
}
@@ -101,7 +102,7 @@ func TestMigrate_InsertIssueComments(t *testing.T) {
101
102
Poster : owner ,
102
103
IssueID : issue .ID ,
103
104
Issue : issue ,
104
- Reactions : []* Reaction {reaction },
105
+ Reactions : []* issues_model. Reaction {reaction },
105
106
}
106
107
107
108
err := InsertIssueComments ([]* Comment {comment })
0 commit comments