@ -19,7 +19,7 @@ import (
func TestCheckUnadoptedRepositories_Add ( t * testing . T ) {
func TestCheckUnadoptedRepositories_Add ( t * testing . T ) {
start := 10
start := 10
end := 20
end := 20
unadopted := & unadoptedRr epositories {
unadopted := & unadoptedRepositories {
start : start ,
start : start ,
end : end ,
end : end ,
index : 0 ,
index : 0 ,
@ -39,7 +39,7 @@ func TestCheckUnadoptedRepositories(t *testing.T) {
//
//
// Non existent user
// Non existent user
//
//
unadopted := & unadoptedRr epositories { start : 0 , end : 100 }
unadopted := & unadoptedRepositories { start : 0 , end : 100 }
err := checkUnadoptedRepositories ( "notauser" , [ ] string { "repo" } , unadopted )
err := checkUnadoptedRepositories ( "notauser" , [ ] string { "repo" } , unadopted )
assert . NoError ( t , err )
assert . NoError ( t , err )
assert . Equal ( t , 0 , len ( unadopted . repositories ) )
assert . Equal ( t , 0 , len ( unadopted . repositories ) )
@ -50,14 +50,14 @@ func TestCheckUnadoptedRepositories(t *testing.T) {
userName := "user2"
userName := "user2"
repoName := "repo2"
repoName := "repo2"
unadoptedRepoName := "unadopted"
unadoptedRepoName := "unadopted"
unadopted = & unadoptedRr epositories { start : 0 , end : 100 }
unadopted = & unadoptedRepositories { start : 0 , end : 100 }
err = checkUnadoptedRepositories ( userName , [ ] string { repoName , unadoptedRepoName } , unadopted )
err = checkUnadoptedRepositories ( userName , [ ] string { repoName , unadoptedRepoName } , unadopted )
assert . NoError ( t , err )
assert . NoError ( t , err )
assert . Equal ( t , [ ] string { path . Join ( userName , unadoptedRepoName ) } , unadopted . repositories )
assert . Equal ( t , [ ] string { path . Join ( userName , unadoptedRepoName ) } , unadopted . repositories )
//
//
// Existing (adopted) repository is not returned
// Existing (adopted) repository is not returned
//
//
unadopted = & unadoptedRr epositories { start : 0 , end : 100 }
unadopted = & unadoptedRepositories { start : 0 , end : 100 }
err = checkUnadoptedRepositories ( userName , [ ] string { repoName } , unadopted )
err = checkUnadoptedRepositories ( userName , [ ] string { repoName } , unadopted )
assert . NoError ( t , err )
assert . NoError ( t , err )
assert . Equal ( t , 0 , len ( unadopted . repositories ) )
assert . Equal ( t , 0 , len ( unadopted . repositories ) )