summaryrefslogtreecommitdiffstats
path: root/services/repository/adopt_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'services/repository/adopt_test.go')
-rw-r--r--services/repository/adopt_test.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/services/repository/adopt_test.go b/services/repository/adopt_test.go
index 3f777c425f..c1520e01c9 100644
--- a/services/repository/adopt_test.go
+++ b/services/repository/adopt_test.go
@@ -30,7 +30,7 @@ func TestCheckUnadoptedRepositories_Add(t *testing.T) {
}
assert.Equal(t, total, unadopted.index)
- assert.Equal(t, end-start, len(unadopted.repositories))
+ assert.Len(t, unadopted.repositories, end-start)
}
func TestCheckUnadoptedRepositories(t *testing.T) {
@@ -41,7 +41,7 @@ func TestCheckUnadoptedRepositories(t *testing.T) {
unadopted := &unadoptedRepositories{start: 0, end: 100}
err := checkUnadoptedRepositories(db.DefaultContext, "notauser", []string{"repo"}, unadopted)
assert.NoError(t, err)
- assert.Equal(t, 0, len(unadopted.repositories))
+ assert.Empty(t, unadopted.repositories)
//
// Unadopted repository is returned
// Existing (adopted) repository is not returned
@@ -59,7 +59,7 @@ func TestCheckUnadoptedRepositories(t *testing.T) {
unadopted = &unadoptedRepositories{start: 0, end: 100}
err = checkUnadoptedRepositories(db.DefaultContext, userName, []string{repoName}, unadopted)
assert.NoError(t, err)
- assert.Equal(t, 0, len(unadopted.repositories))
+ assert.Empty(t, unadopted.repositories)
assert.Equal(t, 0, unadopted.index)
}