Add test for admins
This commit is contained in:
parent
f72b6953ee
commit
0fd3ab178d
|
|
@ -253,6 +253,13 @@ func TestAPIOrgRepoCreate(t *testing.T) {
|
||||||
repoName: "foo",
|
repoName: "foo",
|
||||||
resp: http.StatusCreated,
|
resp: http.StatusCreated,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
desc: "admin",
|
||||||
|
user: models.AssertExistsAndLoadBean(t, &models.User{ID: 1}).(*models.User),
|
||||||
|
org: models.AssertExistsAndLoadBean(t, &models.User{ID: 3}).(*models.User),
|
||||||
|
repoName: "foobar",
|
||||||
|
resp: http.StatusCreated,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
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