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