diff options
author | =Corey Hulen <corey@hulen.com> | 2015-06-14 23:53:32 -0800 |
---|---|---|
committer | =Corey Hulen <corey@hulen.com> | 2015-06-14 23:53:32 -0800 |
commit | cf7a05f80f68b5b1c8bcc0089679dd497cec2506 (patch) | |
tree | 70007378570a6962d7c175ca96af732b71aeb6da /model/team_signup_test.go | |
download | chat-cf7a05f80f68b5b1c8bcc0089679dd497cec2506.tar.gz chat-cf7a05f80f68b5b1c8bcc0089679dd497cec2506.tar.bz2 chat-cf7a05f80f68b5b1c8bcc0089679dd497cec2506.zip |
first commit
Diffstat (limited to 'model/team_signup_test.go')
-rw-r--r-- | model/team_signup_test.go | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/model/team_signup_test.go b/model/team_signup_test.go new file mode 100644 index 000000000..f3f74470b --- /dev/null +++ b/model/team_signup_test.go @@ -0,0 +1,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") + } +} |