summaryrefslogtreecommitdiffstats
path: root/webapp/tests/components/integrations/installed_oauth_app.test.jsx
diff options
context:
space:
mode:
authorChristopher Speller <crspeller@gmail.com>2017-09-06 23:04:13 -0700
committerChristopher Speller <crspeller@gmail.com>2017-09-06 23:11:58 -0700
commitd8bd57901e33a7057e26e782e295099ffcc0da89 (patch)
treee12dfc8cad42b1576756d19d7fbfd82646a009bf /webapp/tests/components/integrations/installed_oauth_app.test.jsx
parent7bc8e9a08dfde56387f946fdf5086252aa4d0491 (diff)
downloadchat-d8bd57901e33a7057e26e782e295099ffcc0da89.tar.gz
chat-d8bd57901e33a7057e26e782e295099ffcc0da89.tar.bz2
chat-d8bd57901e33a7057e26e782e295099ffcc0da89.zip
Removing webapp
Diffstat (limited to 'webapp/tests/components/integrations/installed_oauth_app.test.jsx')
-rw-r--r--webapp/tests/components/integrations/installed_oauth_app.test.jsx71
1 files changed, 0 insertions, 71 deletions
diff --git a/webapp/tests/components/integrations/installed_oauth_app.test.jsx b/webapp/tests/components/integrations/installed_oauth_app.test.jsx
deleted file mode 100644
index ff27a5768..000000000
--- a/webapp/tests/components/integrations/installed_oauth_app.test.jsx
+++ /dev/null
@@ -1,71 +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 InstalledOAuthApp from 'components/integrations/components/installed_oauth_app.jsx';
-
-describe('components/integrations/InstalledOAuthApp', () => {
- const emptyFunction = jest.fn();
- const app = {
- id: 'facxd9wpzpbpfp8pad78xj75pr',
- name: 'testApp',
- client_secret: '88cxd9wpzpbpfp8pad78xj75pr',
- create_at: 1501365458934,
- creator_id: '88oybd1dwfdoxpkpw1h5kpbyco',
- description: 'testing',
- homepage: 'https://test.com',
- icon_url: 'https://test.com/icon',
- is_trusted: true,
- update_at: 1501365458934,
- callback_urls: ['https://test.com/callback', 'https://test.com/callback2']
- };
-
- test('should match snapshot', () => {
- const wrapper = shallow(
- <InstalledOAuthApp
- oauthApp={app}
- onRegenerateSecret={emptyFunction}
- onDelete={emptyFunction}
- filter={''}
- />
- );
- expect(wrapper).toMatchSnapshot();
- });
-
- test('should call onRegenerateSecret function', () => {
- const onRegenerateSecret = jest.genMockFunction().mockImplementation(
- () => {
- return new Promise((resolve) => {
- process.nextTick(() => resolve());
- });
- }
- );
-
- const wrapper = shallow(
- <InstalledOAuthApp
- oauthApp={app}
- onRegenerateSecret={onRegenerateSecret}
- onDelete={emptyFunction}
- filter={''}
- />
- );
- wrapper.find('div.item-actions a').at(1).simulate('click', {preventDefault() {
- return jest.fn();
- }});
- expect(onRegenerateSecret).toBeCalled();
- });
-
- test('should filter out OAuthApp', () => {
- const wrapper = shallow(
- <InstalledOAuthApp
- oauthApp={app}
- onRegenerateSecret={emptyFunction}
- onDelete={emptyFunction}
- filter={'filter'}
- />
- );
- expect(wrapper).toMatchSnapshot();
- });
-}); \ No newline at end of file