github.com/rajatvaryani/mattermost-server@v5.11.1+incompatible/model/initial_load_test.go (about) 1 // Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved. 2 // See License.txt for license information. 3 4 package model 5 6 import ( 7 "strings" 8 "testing" 9 ) 10 11 func TestInitialLoadJson(t *testing.T) { 12 u := &User{Id: NewId()} 13 o := InitialLoad{User: u} 14 json := o.ToJson() 15 ro := InitialLoadFromJson(strings.NewReader(json)) 16 17 if o.User.Id != ro.User.Id { 18 t.Fatal("Ids do not match") 19 } 20 }