Files
mattermost/model/system_test.go

20 lines
386 B
Go
Raw Normal View History

// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
2015-09-16 19:59:57 -07:00
// See License.txt for license information.
package model
import (
"strings"
"testing"
)
func TestSystemJson(t *testing.T) {
system := System{Name: "test", Value: NewId()}
json := system.ToJson()
result := SystemFromJson(strings.NewReader(json))
if result.Name != "test" {
t.Fatal("Ids do not match")
}
}