forked from NYANDEV/forgejo
Fix tests code to prevent some runtime errors (#2381)
* Fix tests code to prevent some runtime errors * Reduce nesting
This commit is contained in:
parent
ced50e0ec1
commit
8e61823ec4
15 changed files with 181 additions and 150 deletions
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue