diff options
author | Christopher Speller <crspeller@gmail.com> | 2015-12-10 08:54:12 -0500 |
---|---|---|
committer | Christopher Speller <crspeller@gmail.com> | 2015-12-10 08:54:12 -0500 |
commit | aef16866066c8fec2529e57a9659fd3cb03acc91 (patch) | |
tree | e92ccc3cb3335238bf9b7fd376dea71454e4a1fc /model/utils_test.go | |
parent | 415276fa6a1af933a8b9b8f71afa81e36d9e0b13 (diff) | |
parent | 7299fd6a4c6a658b378e4df12468d302ff6a7512 (diff) | |
download | chat-aef16866066c8fec2529e57a9659fd3cb03acc91.tar.gz chat-aef16866066c8fec2529e57a9659fd3cb03acc91.tar.bz2 chat-aef16866066c8fec2529e57a9659fd3cb03acc91.zip |
Merge pull request #1688 from mattermost/fix-salts
Generate salts when empty
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() |