diff options
Diffstat (limited to 'webapp/tests/client_command.test.jsx')
-rw-r--r-- | webapp/tests/client_command.test.jsx | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/webapp/tests/client_command.test.jsx b/webapp/tests/client_command.test.jsx index 769fa2fa0..7d39537f8 100644 --- a/webapp/tests/client_command.test.jsx +++ b/webapp/tests/client_command.test.jsx @@ -81,6 +81,34 @@ describe('Client.Commands', function() { }); }); + it('editCommand', function(done) { + TestHelper.initBasic(() => { + TestHelper.basicClient().enableLogErrorsToConsole(false); // Disabling since this unit test causes an error + + var cmd = {}; + cmd.url = 'http://www.gonowhere.com'; + cmd.trigger = '/hello'; + cmd.method = 'P'; + cmd.username = ''; + cmd.icon_url = ''; + cmd.auto_complete = false; + cmd.auto_complete_desc = ''; + cmd.auto_complete_hint = ''; + cmd.display_name = 'Unit Test'; + + TestHelper.basicClient().editCommand( + cmd, + function() { + done(new Error('cmds not enabled')); + }, + function(err) { + assert.equal(err.id, 'api.command.disabled.app_error'); + done(); + } + ); + }); + }); + it('deleteCommand', function(done) { TestHelper.initBasic(() => { TestHelper.basicClient().enableLogErrorsToConsole(false); // Disabling since this unit test causes an error |