aboutsummaryrefslogtreecommitdiffstats
path: root/models/user_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'models/user_test.go')
-rw-r--r--models/user_test.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/models/user_test.go b/models/user_test.go
index e0d4e164fc..39a1b3c989 100644
--- a/models/user_test.go
+++ b/models/user_test.go
@@ -386,14 +386,14 @@ func TestGetMaileableUsersByIDs(t *testing.T) {
results, err := GetMaileableUsersByIDs([]int64{1, 4}, false)
assert.NoError(t, err)
- assert.Equal(t, 1, len(results))
+ assert.Len(t, results, 1)
if len(results) > 1 {
assert.Equal(t, results[0].ID, 1)
}
results, err = GetMaileableUsersByIDs([]int64{1, 4}, true)
assert.NoError(t, err)
- assert.Equal(t, 2, len(results))
+ assert.Len(t, results, 2)
if len(results) > 2 {
assert.Equal(t, results[0].ID, 1)
assert.Equal(t, results[1].ID, 4)
@@ -457,7 +457,7 @@ ssh-dss AAAAB3NzaC1kc3MAAACBAOChCC7lf6Uo9n7BmZ6M8St19PZf4Tn59NriyboW2x/DZuYAz3ib
if err != nil {
continue
}
- assert.Equal(t, kase.number, len(keys))
+ assert.Len(t, keys, kase.number)
for _, key := range keys {
assert.Contains(t, kase.keyContents, key.Content)