forked from forgejo/forgejo
Fix so that user can still fork his own repository to owned organizations (#2699)
* Fix so that user can still fork his own repository to his organizations * Fix to only use owned organizations * Add integration test for forking own repository to owned organization
This commit is contained in:
parent
32ca299650
commit
1ec4dc6c1d
8 changed files with 88 additions and 29 deletions
|
@ -48,7 +48,7 @@ func testPullCleanUp(t *testing.T, session *TestSession, user, repo, pullnum str
|
|||
func TestPullMerge(t *testing.T) {
|
||||
prepareTestEnv(t)
|
||||
session := loginUser(t, "user1")
|
||||
testRepoFork(t, session)
|
||||
testRepoFork(t, session, "user2", "repo1", "user1", "repo1")
|
||||
testEditFile(t, session, "user1", "repo1", "master", "README.md")
|
||||
|
||||
resp := testPullCreate(t, session, "user1", "repo1", "master")
|
||||
|
@ -61,7 +61,7 @@ func TestPullMerge(t *testing.T) {
|
|||
func TestPullCleanUpAfterMerge(t *testing.T) {
|
||||
prepareTestEnv(t)
|
||||
session := loginUser(t, "user1")
|
||||
testRepoFork(t, session)
|
||||
testRepoFork(t, session, "user2", "repo1", "user1", "repo1")
|
||||
testEditFileToNewBranch(t, session, "user1", "repo1", "master", "feature/test", "README.md")
|
||||
|
||||
resp := testPullCreate(t, session, "user1", "repo1", "feature/test")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue