Fix tests code to prevent some runtime errors (#2381)

* Fix tests code to prevent some runtime errors

* Reduce nesting
This commit is contained in:
Morlinest 2017-08-28 11:17:45 +02:00 committed by Lauris BH
parent ced50e0ec1
commit 8e61823ec4
15 changed files with 181 additions and 150 deletions

View file

@ -219,6 +219,7 @@ Q0KHb+QcycSgbDx0ZAvdIacuKvBBcbxrsmFUI4LR+oIup0G9gUc0roPvr014jYQL
key, err := AddGPGKey(1, testEmailWithUpperCaseLetters)
assert.NoError(t, err)
assert.Len(t, key.Emails, 1)
assert.Equal(t, "user1@example.com", key.Emails[0].Email)
if assert.Len(t, key.Emails, 1) {
assert.Equal(t, "user1@example.com", key.Emails[0].Email)
}
}