From 2cfad8523a54d64271d7cbc69a39433eab918aa0 Mon Sep 17 00:00:00 2001 From: Anton Kaliaev Date: Wed, 22 Nov 2017 18:24:53 -0600 Subject: [PATCH] test HumanCode --- types/code_test.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 types/code_test.go diff --git a/types/code_test.go b/types/code_test.go new file mode 100644 index 000000000..d9032d3c5 --- /dev/null +++ b/types/code_test.go @@ -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)) +}