test HumanCode

This commit is contained in:
Anton Kaliaev 2017-11-22 18:24:53 -06:00
parent 1726e82865
commit 2cfad8523a
No known key found for this signature in database
GPG Key ID: 7B6881D965918214
1 changed files with 12 additions and 0 deletions

12
types/code_test.go Normal file
View File

@ -0,0 +1,12 @@
package types
import (
"testing"
"github.com/stretchr/testify/assert"
)
func TestHumanCode(t *testing.T) {
assert.Equal(t, "Internal error", HumanCode(CodeType_InternalError))
assert.Equal(t, "Unknown code", HumanCode(-1))
}