aboutsummaryrefslogtreecommitdiffstats
path: root/models/org_team_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'models/org_team_test.go')
-rw-r--r--models/org_team_test.go30
1 files changed, 0 insertions, 30 deletions
diff --git a/models/org_team_test.go b/models/org_team_test.go
index 446084c815..4978f8ef99 100644
--- a/models/org_team_test.go
+++ b/models/org_team_test.go
@@ -51,36 +51,6 @@ func TestTeam_RemoveMember(t *testing.T) {
assert.True(t, organization.IsErrLastOrgOwner(err))
}
-func TestTeam_HasRepository(t *testing.T) {
- assert.NoError(t, unittest.PrepareTestDatabase())
-
- test := func(teamID, repoID int64, expected bool) {
- team := unittest.AssertExistsAndLoadBean(t, &organization.Team{ID: teamID})
- assert.Equal(t, expected, HasRepository(team, repoID))
- }
- test(1, 1, false)
- test(1, 3, true)
- test(1, 5, true)
- test(1, unittest.NonexistentID, false)
-
- test(2, 3, true)
- test(2, 5, false)
-}
-
-func TestTeam_RemoveRepository(t *testing.T) {
- assert.NoError(t, unittest.PrepareTestDatabase())
-
- testSuccess := func(teamID, repoID int64) {
- team := unittest.AssertExistsAndLoadBean(t, &organization.Team{ID: teamID})
- assert.NoError(t, RemoveRepository(team, repoID))
- unittest.AssertNotExistsBean(t, &organization.TeamRepo{TeamID: teamID, RepoID: repoID})
- unittest.CheckConsistencyFor(t, &organization.Team{ID: teamID}, &repo_model.Repository{ID: repoID})
- }
- testSuccess(2, 3)
- testSuccess(2, 5)
- testSuccess(1, unittest.NonexistentID)
-}
-
func TestIsUsableTeamName(t *testing.T) {
assert.NoError(t, organization.IsUsableTeamName("usable"))
assert.True(t, db.IsErrNameReserved(organization.IsUsableTeamName("new")))