diff options
Diffstat (limited to 'models/repo_test.go')
-rw-r--r-- | models/repo_test.go | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/models/repo_test.go b/models/repo_test.go index bf10de8d99..72a2959eb7 100644 --- a/models/repo_test.go +++ b/models/repo_test.go @@ -15,7 +15,6 @@ import ( "code.gitea.io/gitea/modules/markup" "github.com/stretchr/testify/assert" - "github.com/unknwon/com" ) func TestRepo(t *testing.T) { @@ -142,29 +141,6 @@ func TestRepoAPIURL(t *testing.T) { assert.Equal(t, "https://try.gitea.io/api/v1/repos/user12/repo10", repo.APIURL()) } -func TestTransferOwnership(t *testing.T) { - assert.NoError(t, PrepareTestDatabase()) - - doer := AssertExistsAndLoadBean(t, &User{ID: 2}).(*User) - repo := AssertExistsAndLoadBean(t, &Repository{ID: 3}).(*Repository) - repo.Owner = AssertExistsAndLoadBean(t, &User{ID: repo.OwnerID}).(*User) - assert.NoError(t, TransferOwnership(doer, "user2", repo)) - - transferredRepo := AssertExistsAndLoadBean(t, &Repository{ID: 3}).(*Repository) - assert.EqualValues(t, 2, transferredRepo.OwnerID) - - assert.False(t, com.IsExist(RepoPath("user3", "repo3"))) - assert.True(t, com.IsExist(RepoPath("user2", "repo3"))) - AssertExistsAndLoadBean(t, &Action{ - OpType: ActionTransferRepo, - ActUserID: 2, - RepoID: 3, - Content: "user3/repo3", - }) - - CheckConsistencyFor(t, &Repository{}, &User{}, &Team{}) -} - func TestUploadAvatar(t *testing.T) { // Generate image |