summaryrefslogtreecommitdiffstats
path: root/model/command_response_test.go
blob: 7aa3e984b69c85bc4eb163c9fd2cf6f11b8bb8b5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// Copyright (c) 2016 Mattermost, Inc. All Rights Reserved.
// See License.txt for license information.

package model

import (
	"strings"
	"testing"
)

func TestCommandResponseJson(t *testing.T) {
	o := CommandResponse{Text: "test"}
	json := o.ToJson()
	ro := CommandResponseFromJson(strings.NewReader(json))

	if o.Text != ro.Text {
		t.Fatal("Ids do not match")
	}
}