More unit tests

This commit is contained in:
Manu Mtz-Almeida
2015-07-03 04:20:18 +02:00
parent 4194adce4c
commit 0316b735c4
3 changed files with 24 additions and 5 deletions

View File

@ -63,6 +63,7 @@ func TestErrorSlice(t *testing.T) {
{Err: errors.New("third"), Type: ErrorTypePublic, Meta: H{"status": "400"}},
}
assert.Equal(t, errs, errs.ByType(ErrorTypeAny))
assert.Equal(t, errs.Last().Error(), "third")
assert.Equal(t, errs.Errors(), []string{"first", "second", "third"})
assert.Equal(t, errs.ByType(ErrorTypePublic).Errors(), []string{"third"})