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.go19
1 files changed, 0 insertions, 19 deletions
diff --git a/models/org_team_test.go b/models/org_team_test.go
index a0de6d73f1..a600d07c0c 100644
--- a/models/org_team_test.go
+++ b/models/org_team_test.go
@@ -68,25 +68,6 @@ func TestTeam_HasRepository(t *testing.T) {
test(2, 5, false)
}
-func TestTeam_AddRepository(t *testing.T) {
- assert.NoError(t, unittest.PrepareTestDatabase())
-
- testSuccess := func(teamID, repoID int64) {
- team := unittest.AssertExistsAndLoadBean(t, &organization.Team{ID: teamID})
- repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: repoID})
- assert.NoError(t, AddRepository(team, repo))
- unittest.AssertExistsAndLoadBean(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)
-
- team := unittest.AssertExistsAndLoadBean(t, &organization.Team{ID: 1})
- repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: 1})
- assert.Error(t, AddRepository(team, repo))
- unittest.CheckConsistencyFor(t, &organization.Team{ID: 1}, &repo_model.Repository{ID: 1})
-}
-
func TestTeam_RemoveRepository(t *testing.T) {
assert.NoError(t, unittest.PrepareTestDatabase())