add tests for non-member
This commit is contained in:
parent
0fd3ab178d
commit
e85dd8f407
|
|
@ -260,6 +260,13 @@ func TestAPIOrgRepoCreate(t *testing.T) {
|
||||||
repoName: "foobar",
|
repoName: "foobar",
|
||||||
resp: http.StatusCreated,
|
resp: http.StatusCreated,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
desc: "non-member of organization",
|
||||||
|
user: models.AssertExistsAndLoadBean(t, &models.User{ID: 15}).(*models.User),
|
||||||
|
org: models.AssertExistsAndLoadBean(t, &models.User{ID: 3}).(*models.User),
|
||||||
|
repoName: "foobaz",
|
||||||
|
resp: http.StatusForbidden,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
for _, tc := range testCases {
|
for _, tc := range testCases {
|
||||||
t.Run(tc.desc, func(t *testing.T) {
|
t.Run(tc.desc, func(t *testing.T) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user