diff options
author | Joram Wilander <jwawilander@gmail.com> | 2017-04-10 08:19:49 -0400 |
---|---|---|
committer | Christopher Speller <crspeller@gmail.com> | 2017-04-10 08:19:49 -0400 |
commit | dfc6db737411bd4ad68a803be5182f06055a1769 (patch) | |
tree | 375d93b8d1d8b1384988dc708c9f337e0ea2366c /model/switch_request_test.go | |
parent | 7b77bcf87e85330a1f7f0b2a2dcbf71326bf2fba (diff) | |
download | chat-dfc6db737411bd4ad68a803be5182f06055a1769.tar.gz chat-dfc6db737411bd4ad68a803be5182f06055a1769.tar.bz2 chat-dfc6db737411bd4ad68a803be5182f06055a1769.zip |
Refactor switching login type code into app layer and add v4 endpoint (#6000)
* Refactor switching login type code into app layer and add v4 endpoint
* Fix unit test
Diffstat (limited to 'model/switch_request_test.go')
-rw-r--r-- | model/switch_request_test.go | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/model/switch_request_test.go b/model/switch_request_test.go new file mode 100644 index 000000000..b85846f78 --- /dev/null +++ b/model/switch_request_test.go @@ -0,0 +1,19 @@ +// Copyright (c) 2017 Mattermost, Inc. All Rights Reserved. +// See License.txt for license information. + +package model + +import ( + "strings" + "testing" +) + +func TestSwitchRequestJson(t *testing.T) { + o := SwitchRequest{Email: NewId(), Password: NewId()} + json := o.ToJson() + ro := SwitchRequestFromJson(strings.NewReader(json)) + + if o.Email != ro.Email { + t.Fatal("Emails do not match") + } +} |