diff options
Diffstat (limited to 'model/push_notification_test.go')
-rw-r--r-- | model/push_notification_test.go | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/model/push_notification_test.go b/model/push_notification_test.go new file mode 100644 index 000000000..94329f389 --- /dev/null +++ b/model/push_notification_test.go @@ -0,0 +1,19 @@ +// Copyright (c) 2015 Mattermost, Inc. All Rights Reserved. +// See License.txt for license information. + +package model + +import ( + "strings" + "testing" +) + +func TestPushNotification(t *testing.T) { + msg := PushNotification{Platform: "test"} + json := msg.ToJson() + result := PushNotificationFromJson(strings.NewReader(json)) + + if msg.Platform != result.Platform { + t.Fatal("Ids do not match") + } +} |