blob: ce5019049c680c6d632fde9defea0596e53a4310 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
// Copyright (c) 2016-present Mattermost, Inc. All Rights Reserved.
// See License.txt for license information.
package api
import (
"github.com/mattermost/platform/model"
"strings"
"testing"
)
func TestShortcutsCommand(t *testing.T) {
th := Setup().InitBasic()
Client := th.BasicClient
channel := th.BasicChannel
rs := Client.Must(Client.Command(channel.Id, "/shortcuts ")).Data.(*model.CommandResponse)
if !strings.Contains(rs.Text, "CTRL") {
t.Fatal("failed to display shortcuts")
}
rs = Client.Must(Client.Command(channel.Id, "/shortcuts mac")).Data.(*model.CommandResponse)
if !strings.Contains(rs.Text, "CMD") {
t.Fatal("failed to display Mac shortcuts")
}
}
|