Files
mostlymatter/model/switch_request_test.go
Joram Wilander dfc6db7374 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
2017-04-10 08:19:49 -04:00

20 строки
391 B
Go

// 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")
}
}