summaryrefslogtreecommitdiffstats
path: root/model/initial_load_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'model/initial_load_test.go')
-rw-r--r--model/initial_load_test.go20
1 files changed, 20 insertions, 0 deletions
diff --git a/model/initial_load_test.go b/model/initial_load_test.go
new file mode 100644
index 000000000..24a07e412
--- /dev/null
+++ b/model/initial_load_test.go
@@ -0,0 +1,20 @@
+// Copyright (c) 2015 Mattermost, Inc. All Rights Reserved.
+// See License.txt for license information.
+
+package model
+
+import (
+ "strings"
+ "testing"
+)
+
+func TestInitialLoadJson(t *testing.T) {
+ u := &User{Id: NewId()}
+ o := InitialLoad{User: u}
+ json := o.ToJson()
+ ro := InitialLoadFromJson(strings.NewReader(json))
+
+ if o.User.Id != ro.User.Id {
+ t.Fatal("Ids do not match")
+ }
+}