summaryrefslogtreecommitdiffstats
path: root/model/switch_request_test.go
blob: b85846f7818afb42b4f9c9075621862159925871 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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")
	}
}