Files
mattermost/model/suggest_command_test.go
Nicholas Lim 928b07f940 change model/suggest_command_test.go to use assert (#12575)
Merging! happy hacktoberfest! 🥇
2019-10-04 11:07:01 +02:00

20 lines
458 B
Go

// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See License.txt for license information.
package model
import (
"strings"
"testing"
"github.com/stretchr/testify/assert"
)
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")
}