Add check for organization that user does not belog to

This commit is contained in:
Lauris Bukšis-Haberkorns 2018-07-05 00:06:02 +03:00
parent 61e56dd32c
commit e0ffe0b58d
No known key found for this signature in database
GPG Key ID: AECE216D007B1CCC

View File

@ -245,6 +245,7 @@ func TestAPIRepoMigrate(t *testing.T) {
{ctxUserID: 2, userID: 2, cloneURL: "https://github.com/go-gitea/git.git", repoName: "git", expectedStatus: http.StatusCreated},
{ctxUserID: 2, userID: 1, cloneURL: "https://github.com/go-gitea/git.git", repoName: "git-bad", expectedStatus: http.StatusForbidden},
{ctxUserID: 2, userID: 3, cloneURL: "https://github.com/go-gitea/git.git", repoName: "git-org", expectedStatus: http.StatusCreated},
{ctxUserID: 2, userID: 6, cloneURL: "https://github.com/go-gitea/git.git", repoName: "git-bad-org", expectedStatus: http.StatusForbidden},
}
prepareTestEnv(t)