diff options
Diffstat (limited to 'integrations/api_issue_label_test.go')
-rw-r--r-- | integrations/api_issue_label_test.go | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/integrations/api_issue_label_test.go b/integrations/api_issue_label_test.go index 4508069e17..f9c297a18e 100644 --- a/integrations/api_issue_label_test.go +++ b/integrations/api_issue_label_test.go @@ -10,6 +10,8 @@ import ( "strings" "testing" + "code.gitea.io/gitea/models/unittest" + "code.gitea.io/gitea/models" "code.gitea.io/gitea/models/db" api "code.gitea.io/gitea/modules/structs" @@ -18,7 +20,7 @@ import ( ) func TestAPIModifyLabels(t *testing.T) { - assert.NoError(t, db.LoadFixtures()) + assert.NoError(t, unittest.LoadFixtures()) repo := db.AssertExistsAndLoadBean(t, &models.Repository{ID: 2}).(*models.Repository) owner := db.AssertExistsAndLoadBean(t, &models.User{ID: repo.OwnerID}).(*models.User) @@ -88,7 +90,7 @@ func TestAPIModifyLabels(t *testing.T) { } func TestAPIAddIssueLabels(t *testing.T) { - assert.NoError(t, db.LoadFixtures()) + assert.NoError(t, unittest.LoadFixtures()) repo := db.AssertExistsAndLoadBean(t, &models.Repository{ID: 1}).(*models.Repository) issue := db.AssertExistsAndLoadBean(t, &models.Issue{RepoID: repo.ID}).(*models.Issue) @@ -111,7 +113,7 @@ func TestAPIAddIssueLabels(t *testing.T) { } func TestAPIReplaceIssueLabels(t *testing.T) { - assert.NoError(t, db.LoadFixtures()) + assert.NoError(t, unittest.LoadFixtures()) repo := db.AssertExistsAndLoadBean(t, &models.Repository{ID: 1}).(*models.Repository) issue := db.AssertExistsAndLoadBean(t, &models.Issue{RepoID: repo.ID}).(*models.Issue) @@ -137,7 +139,7 @@ func TestAPIReplaceIssueLabels(t *testing.T) { } func TestAPIModifyOrgLabels(t *testing.T) { - assert.NoError(t, db.LoadFixtures()) + assert.NoError(t, unittest.LoadFixtures()) repo := db.AssertExistsAndLoadBean(t, &models.Repository{ID: 3}).(*models.Repository) owner := db.AssertExistsAndLoadBean(t, &models.User{ID: repo.OwnerID}).(*models.User) |