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

package api

import (
	"strings"
	"testing"

	"github.com/mattermost/platform/model"
)

func TestLogoutTestCommand(t *testing.T) {
	th := Setup().InitBasic()

	rs1 := th.BasicClient.Must(th.BasicClient.Command(th.BasicChannel.Id, "/logout", false)).Data.(*model.CommandResponse)
	if !strings.HasSuffix(rs1.GotoLocation, "logout") {
		t.Fatal("failed to logout")
	}
}