mirror of
https://github.com/mattermost/mattermost.git
synced 2026-05-28 04:35:04 -04:00
test: harden local bot create permission check
This commit is contained in:
parent
41761eed55
commit
dd3d863e48
1 changed files with 3 additions and 1 deletions
|
|
@ -407,8 +407,10 @@ func (s *MmctlE2ETestSuite) TestBotCreateCmdF() {
|
|||
cmd := &cobra.Command{}
|
||||
cmd.Flags().Bool("with-token", true, "")
|
||||
|
||||
err := botCreateCmdF(s.th.Client, cmd, []string{"testbot"})
|
||||
username := model.NewUsername()
|
||||
err := botCreateCmdF(s.th.Client, cmd, []string{username})
|
||||
s.Require().Error(err)
|
||||
s.Require().Contains(err.Error(), "permissions")
|
||||
s.Require().Empty(printer.GetLines())
|
||||
s.Require().Empty(printer.GetErrorLines())
|
||||
})
|
||||
|
|
|
|||
Loading…
Reference in a new issue