summaryrefslogtreecommitdiffstats
path: root/model/team_signup_test.go
blob: a830842aa0b00c5c3651aaf8458ed28b4993e1a6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// Copyright (c) 2015 Mattermost, Inc. All Rights Reserved.
// See License.txt for license information.

package model

import (
	"strings"
	"testing"
)

func TestTeamSignupJson(t *testing.T) {
	team := Team{Id: NewId(), DisplayName: NewId()}
	o := TeamSignup{Team: team, Data: "data"}
	json := o.ToJson()
	ro := TeamSignupFromJson(strings.NewReader(json))

	if o.Team.Id != ro.Team.Id {
		t.Fatal("Ids do not match")
	}
}