summaryrefslogtreecommitdiffstats
path: root/models/user_mail_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'models/user_mail_test.go')
-rw-r--r--models/user_mail_test.go16
1 files changed, 9 insertions, 7 deletions
diff --git a/models/user_mail_test.go b/models/user_mail_test.go
index 4c0b6804d6..3352194e1f 100644
--- a/models/user_mail_test.go
+++ b/models/user_mail_test.go
@@ -14,15 +14,17 @@ func TestGetEmailAddresses(t *testing.T) {
assert.NoError(t, PrepareTestDatabase())
emails, _ := GetEmailAddresses(int64(1))
- assert.Len(t, emails, 3)
- assert.False(t, emails[0].IsPrimary)
- assert.True(t, emails[2].IsActivated)
- assert.True(t, emails[2].IsPrimary)
+ if assert.Len(t, emails, 3) {
+ assert.False(t, emails[0].IsPrimary)
+ assert.True(t, emails[2].IsActivated)
+ assert.True(t, emails[2].IsPrimary)
+ }
emails, _ = GetEmailAddresses(int64(2))
- assert.Len(t, emails, 2)
- assert.True(t, emails[0].IsPrimary)
- assert.True(t, emails[0].IsActivated)
+ if assert.Len(t, emails, 2) {
+ assert.True(t, emails[0].IsPrimary)
+ assert.True(t, emails[0].IsActivated)
+ }
}
func TestIsEmailUsed(t *testing.T) {