diff options
author | Chris <ccbrown112@gmail.com> | 2017-12-05 17:34:10 -0600 |
---|---|---|
committer | Christopher Speller <crspeller@gmail.com> | 2017-12-05 15:34:10 -0800 |
commit | eb027c0d3bcd473db17ef6f9c96545b9406b3636 (patch) | |
tree | 0bd78cfd9df2beba160e64e2ef420c2b8410042d /plugin/rpcplugin/api_test.go | |
parent | 7cefef6d21fa76de0683d2fe9ff56a6e28816628 (diff) | |
download | chat-eb027c0d3bcd473db17ef6f9c96545b9406b3636.tar.gz chat-eb027c0d3bcd473db17ef6f9c96545b9406b3636.tar.bz2 chat-eb027c0d3bcd473db17ef6f9c96545b9406b3636.zip |
make slack attachments gobable (#7948)
Diffstat (limited to 'plugin/rpcplugin/api_test.go')
-rw-r--r-- | plugin/rpcplugin/api_test.go | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/plugin/rpcplugin/api_test.go b/plugin/rpcplugin/api_test.go index 8a36ef4f6..f9e474d4a 100644 --- a/plugin/rpcplugin/api_test.go +++ b/plugin/rpcplugin/api_test.go @@ -8,6 +8,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" + "github.com/stretchr/testify/require" "github.com/mattermost/mattermost-server/model" "github.com/mattermost/mattermost-server/plugin" @@ -70,6 +71,11 @@ func TestAPI(t *testing.T) { testPost := &model.Post{ Message: "hello", + Props: map[string]interface{}{ + "attachments": []*model.SlackAttachment{ + &model.SlackAttachment{}, + }, + }, } testAPIRPC(&api, func(remote plugin.API) { @@ -192,9 +198,9 @@ func TestAPI(t *testing.T) { return p, nil }).Once() post, err := remote.CreatePost(testPost) + require.Nil(t, err) assert.NotEmpty(t, post.Id) assert.Equal(t, testPost.Message, post.Message) - assert.Nil(t, err) api.On("DeletePost", "thepostid").Return(nil).Once() assert.Nil(t, remote.DeletePost("thepostid")) |