diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2019-10-18 19:13:31 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-10-18 19:13:31 +0800 |
commit | 945f121262ef5a393d9530b62a82b2c141bbe21c (patch) | |
tree | 13d4d91da9a75295ee3455ff183a61c4d3fbb3ad /models/pull_test.go | |
parent | fecd8f949dedac0751db99dec590ff12ae56818d (diff) | |
download | gitea-945f121262ef5a393d9530b62a82b2c141bbe21c.tar.gz gitea-945f121262ef5a393d9530b62a82b2c141bbe21c.zip |
Fix bug on pull requests when transfer head repository (#8564)
* fix bug on pull requests when transfer head repository
* add migration and fix lint
* fix tests and add a cache check on LoadBaseRepo
Diffstat (limited to 'models/pull_test.go')
-rw-r--r-- | models/pull_test.go | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/models/pull_test.go b/models/pull_test.go index df051d51bc..8e2436b1a2 100644 --- a/models/pull_test.go +++ b/models/pull_test.go @@ -232,20 +232,6 @@ func TestPullRequestList_LoadAttributes(t *testing.T) { // TODO TestAddTestPullRequestTask -func TestChangeUsernameInPullRequests(t *testing.T) { - assert.NoError(t, PrepareTestDatabase()) - const newUsername = "newusername" - assert.NoError(t, ChangeUsernameInPullRequests("user1", newUsername)) - - prs := make([]*PullRequest, 0, 10) - assert.NoError(t, x.Where("head_user_name = ?", newUsername).Find(&prs)) - assert.Len(t, prs, 2) - for _, pr := range prs { - assert.Equal(t, newUsername, pr.HeadUserName) - } - CheckConsistencyFor(t, &PullRequest{}) -} - func TestPullRequest_IsWorkInProgress(t *testing.T) { assert.NoError(t, PrepareTestDatabase()) |