diff options
author | Christopher Speller <crspeller@gmail.com> | 2017-09-06 23:04:13 -0700 |
---|---|---|
committer | Christopher Speller <crspeller@gmail.com> | 2017-09-06 23:11:58 -0700 |
commit | d8bd57901e33a7057e26e782e295099ffcc0da89 (patch) | |
tree | e12dfc8cad42b1576756d19d7fbfd82646a009bf /webapp/tests/components/integrations/installed_command.test.jsx | |
parent | 7bc8e9a08dfde56387f946fdf5086252aa4d0491 (diff) | |
download | chat-d8bd57901e33a7057e26e782e295099ffcc0da89.tar.gz chat-d8bd57901e33a7057e26e782e295099ffcc0da89.tar.bz2 chat-d8bd57901e33a7057e26e782e295099ffcc0da89.zip |
Removing webapp
Diffstat (limited to 'webapp/tests/components/integrations/installed_command.test.jsx')
-rw-r--r-- | webapp/tests/components/integrations/installed_command.test.jsx | 83 |
1 files changed, 0 insertions, 83 deletions
diff --git a/webapp/tests/components/integrations/installed_command.test.jsx b/webapp/tests/components/integrations/installed_command.test.jsx deleted file mode 100644 index b38d04754..000000000 --- a/webapp/tests/components/integrations/installed_command.test.jsx +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright (c) 2017-present Mattermost, Inc. All Rights Reserved. -// See License.txt for license information. - -import React from 'react'; -import {shallow} from 'enzyme'; - -import InstalledCommand from 'components/integrations/components/installed_command.jsx'; - -describe('components/integrations/InstalledCommand', () => { - const emptyFunction = jest.fn(); - const command = { - id: 'r5tpgt4iepf45jt768jz84djic', - display_name: 'test', - description: 'test', - trigger: 'trigger', - auto_complete: 'test', - auto_complete_hint: 'test', - token: 'testToken', - create_at: '1499722850203' - }; - - test('should match snapshot', () => { - const wrapper = shallow( - <InstalledCommand - team={{ - name: 'test' - }} - command={command} - onRegenToken={emptyFunction} - onDelete={emptyFunction} - filter={'trigger'} - creator={{ - username: 'test' - }} - canChange={true} - /> - ); - expect(wrapper).toMatchSnapshot(); - }); - - test('should call onRegenToken function', () => { - const onRegenToken = jest.fn(); - const wrapper = shallow( - <InstalledCommand - team={{ - name: 'test' - }} - command={command} - onRegenToken={onRegenToken} - onDelete={emptyFunction} - filter={''} - creator={{ - username: 'test' - }} - canChange={true} - /> - ); - wrapper.find('div.item-actions a').first().simulate('click', {preventDefault() { - return jest.fn(); - }}); - - expect(onRegenToken).toBeCalled(); - }); - - test('should filter out command', () => { - const wrapper = shallow( - <InstalledCommand - team={{ - name: 'test' - }} - command={command} - onRegenToken={emptyFunction} - onDelete={emptyFunction} - filter={'filter'} - creator={{ - username: 'test' - }} - canChange={true} - /> - ); - expect(wrapper).toMatchSnapshot(); - }); -}); |