summaryrefslogtreecommitdiffstats
path: root/services/org/org_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'services/org/org_test.go')
-rw-r--r--services/org/org_test.go15
1 files changed, 8 insertions, 7 deletions
diff --git a/services/org/org_test.go b/services/org/org_test.go
index aaa2756bb5..b30bfddbb4 100644
--- a/services/org/org_test.go
+++ b/services/org/org_test.go
@@ -9,6 +9,7 @@ import (
"testing"
"code.gitea.io/gitea/models"
+ "code.gitea.io/gitea/models/organization"
"code.gitea.io/gitea/models/unittest"
user_model "code.gitea.io/gitea/models/user"
@@ -21,18 +22,18 @@ func TestMain(m *testing.M) {
func TestDeleteOrganization(t *testing.T) {
assert.NoError(t, unittest.PrepareTestDatabase())
- org := unittest.AssertExistsAndLoadBean(t, &models.Organization{ID: 6}).(*models.Organization)
+ org := unittest.AssertExistsAndLoadBean(t, &organization.Organization{ID: 6}).(*organization.Organization)
assert.NoError(t, DeleteOrganization(org))
- unittest.AssertNotExistsBean(t, &models.Organization{ID: 6})
- unittest.AssertNotExistsBean(t, &models.OrgUser{OrgID: 6})
- unittest.AssertNotExistsBean(t, &models.Team{OrgID: 6})
+ unittest.AssertNotExistsBean(t, &organization.Organization{ID: 6})
+ unittest.AssertNotExistsBean(t, &organization.OrgUser{OrgID: 6})
+ unittest.AssertNotExistsBean(t, &organization.Team{OrgID: 6})
- org = unittest.AssertExistsAndLoadBean(t, &models.Organization{ID: 3}).(*models.Organization)
+ org = unittest.AssertExistsAndLoadBean(t, &organization.Organization{ID: 3}).(*organization.Organization)
err := DeleteOrganization(org)
assert.Error(t, err)
assert.True(t, models.IsErrUserOwnRepos(err))
- user := unittest.AssertExistsAndLoadBean(t, &models.Organization{ID: 5}).(*models.Organization)
+ user := unittest.AssertExistsAndLoadBean(t, &organization.Organization{ID: 5}).(*organization.Organization)
assert.Error(t, DeleteOrganization(user))
- unittest.CheckConsistencyFor(t, &user_model.User{}, &models.Team{})
+ unittest.CheckConsistencyFor(t, &user_model.User{}, &organization.Team{})
}