@ -42,7 +42,7 @@ func TestAddReadOnlyDeployKey(t *testing.T) {
}
unittest . PrepareTestEnv ( t )
ctx := test . MockContext ( t , "user2/repo1/settings/keys" )
ctx , _ := test . MockContext ( t , "user2/repo1/settings/keys" )
test . LoadUser ( t , ctx , 2 )
test . LoadRepo ( t , ctx , 2 )
@ -71,7 +71,7 @@ func TestAddReadWriteOnlyDeployKey(t *testing.T) {
unittest . PrepareTestEnv ( t )
ctx := test . MockContext ( t , "user2/repo1/settings/keys" )
ctx , _ := test . MockContext ( t , "user2/repo1/settings/keys" )
test . LoadUser ( t , ctx , 2 )
test . LoadRepo ( t , ctx , 2 )
@ -94,7 +94,7 @@ func TestAddReadWriteOnlyDeployKey(t *testing.T) {
func TestCollaborationPost ( t * testing . T ) {
unittest . PrepareTestEnv ( t )
ctx := test . MockContext ( t , "user2/repo1/issues/labels" )
ctx , _ := test . MockContext ( t , "user2/repo1/issues/labels" )
test . LoadUser ( t , ctx , 2 )
test . LoadUser ( t , ctx , 4 )
test . LoadRepo ( t , ctx , 1 )
@ -129,7 +129,7 @@ func TestCollaborationPost(t *testing.T) {
func TestCollaborationPost_InactiveUser ( t * testing . T ) {
unittest . PrepareTestEnv ( t )
ctx := test . MockContext ( t , "user2/repo1/issues/labels" )
ctx , _ := test . MockContext ( t , "user2/repo1/issues/labels" )
test . LoadUser ( t , ctx , 2 )
test . LoadUser ( t , ctx , 9 )
test . LoadRepo ( t , ctx , 1 )
@ -152,7 +152,7 @@ func TestCollaborationPost_InactiveUser(t *testing.T) {
func TestCollaborationPost_AddCollaboratorTwice ( t * testing . T ) {
unittest . PrepareTestEnv ( t )
ctx := test . MockContext ( t , "user2/repo1/issues/labels" )
ctx , _ := test . MockContext ( t , "user2/repo1/issues/labels" )
test . LoadUser ( t , ctx , 2 )
test . LoadUser ( t , ctx , 4 )
test . LoadRepo ( t , ctx , 1 )
@ -193,7 +193,7 @@ func TestCollaborationPost_AddCollaboratorTwice(t *testing.T) {
func TestCollaborationPost_NonExistentUser ( t * testing . T ) {
unittest . PrepareTestEnv ( t )
ctx := test . MockContext ( t , "user2/repo1/issues/labels" )
ctx , _ := test . MockContext ( t , "user2/repo1/issues/labels" )
test . LoadUser ( t , ctx , 2 )
test . LoadRepo ( t , ctx , 1 )
@ -215,7 +215,7 @@ func TestCollaborationPost_NonExistentUser(t *testing.T) {
func TestAddTeamPost ( t * testing . T ) {
unittest . PrepareTestEnv ( t )
ctx := test . MockContext ( t , "org26/repo43" )
ctx , _ := test . MockContext ( t , "org26/repo43" )
ctx . Req . Form . Set ( "team" , "team11" )
@ -255,7 +255,7 @@ func TestAddTeamPost(t *testing.T) {
func TestAddTeamPost_NotAllowed ( t * testing . T ) {
unittest . PrepareTestEnv ( t )
ctx := test . MockContext ( t , "org26/repo43" )
ctx , _ := test . MockContext ( t , "org26/repo43" )
ctx . Req . Form . Set ( "team" , "team11" )
@ -295,7 +295,7 @@ func TestAddTeamPost_NotAllowed(t *testing.T) {
func TestAddTeamPost_AddTeamTwice ( t * testing . T ) {
unittest . PrepareTestEnv ( t )
ctx := test . MockContext ( t , "org26/repo43" )
ctx , _ := test . MockContext ( t , "org26/repo43" )
ctx . Req . Form . Set ( "team" , "team11" )
@ -336,7 +336,7 @@ func TestAddTeamPost_AddTeamTwice(t *testing.T) {
func TestAddTeamPost_NonExistentTeam ( t * testing . T ) {
unittest . PrepareTestEnv ( t )
ctx := test . MockContext ( t , "org26/repo43" )
ctx , _ := test . MockContext ( t , "org26/repo43" )
ctx . Req . Form . Set ( "team" , "team-non-existent" )
@ -369,7 +369,7 @@ func TestAddTeamPost_NonExistentTeam(t *testing.T) {
func TestDeleteTeam ( t * testing . T ) {
unittest . PrepareTestEnv ( t )
ctx := test . MockContext ( t , "org3/team1/repo3" )
ctx , _ := test . MockContext ( t , "org3/team1/repo3" )
ctx . Req . Form . Set ( "id" , "2" )