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
Этот коммит содержится в:
коммит произвёл
Christopher Speller
родитель
7b77bcf87e
Коммит
dfc6db7374
19
model/switch_request_test.go
Обычный файл
19
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")
|
||||
}
|
||||
}
|
||||
Ссылка в новой задаче
Block a user