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