From abda39b6523f2563d4663036f13ad1c24dac161e Mon Sep 17 00:00:00 2001 From: =Corey Hulen Date: Wed, 16 Sep 2015 19:59:57 -0700 Subject: Adding database schema version --- model/system_test.go | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 model/system_test.go (limited to 'model/system_test.go') diff --git a/model/system_test.go b/model/system_test.go new file mode 100644 index 000000000..14ba0db2e --- /dev/null +++ b/model/system_test.go @@ -0,0 +1,19 @@ +// Copyright (c) 2015 Spinpunch, Inc. All Rights Reserved. +// 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") + } +} -- cgit v1.2.3-1-g7c22