diff options
Diffstat (limited to 'model/utils_test.go')
-rw-r--r-- | model/utils_test.go | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/model/utils_test.go b/model/utils_test.go index 7f14bcdf0..1f1e5f023 100644 --- a/model/utils_test.go +++ b/model/utils_test.go @@ -17,6 +17,15 @@ func TestNewId(t *testing.T) { } } +func TestRandomString(t *testing.T) { + for i := 0; i < 1000; i++ { + r := NewRandomString(32) + if len(r) != 32 { + t.Fatal("should be 32 chars") + } + } +} + func TestAppError(t *testing.T) { err := NewAppError("TestAppError", "message", "") json := err.ToJson() |