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

package model

import (
	"strings"
	"testing"
)

func TestTeamSignupJson(t *testing.T) {
	team := Team{Id: NewId(), Name: 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")
	}
}