Files
mattermost/model/suggest_command_test.go

20 lines
458 B
Go
Raw Normal View History

// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
2015-06-14 23:53:32 -08:00
// See License.txt for license information.
package model
import (
"strings"
"testing"
"github.com/stretchr/testify/assert"
2015-06-14 23:53:32 -08:00
)
func TestSuggestCommandJson(t *testing.T) {
command := &SuggestCommand{Suggestion: NewId()}
json := command.ToJson()
result := SuggestCommandFromJson(strings.NewReader(json))
assert.Equal(t, command.Suggestion, result.Suggestion, "Ids do not match")
2015-06-14 23:53:32 -08:00
}