[MM-47824] fix promoteGuestToUserCmdF to handle the proper errors (#26397)
Co-authored-by: Mattermost Build <build@mattermost.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
7337c384a8
Коммит
46bd4599f0
@@ -2747,7 +2747,7 @@ func (s *MmctlUnitTestSuite) TestPromoteGuestToUserCmd() {
|
||||
Times(1)
|
||||
|
||||
err := promoteGuestToUserCmdF(s.client, nil, []string{emailArg})
|
||||
s.Require().NoError(err)
|
||||
s.Require().ErrorContains(err, "unable to promote guest")
|
||||
s.Require().Len(printer.GetLines(), 0)
|
||||
s.Require().Len(printer.GetErrorLines(), 1)
|
||||
s.Require().Equal(fmt.Sprintf("unable to promote guest %s: %s", emailArg, "some-error"), printer.GetErrorLines()[0])
|
||||
|
||||
Ссылка в новой задаче
Block a user