From 950810accbc3523316017b579c10b4e25ad0ce6d Mon Sep 17 00:00:00 2001 From: Matthew Shao Date: Fri, 2 Jun 2017 09:19:44 +0800 Subject: [web] Update tests for js/components/ContentView/ContentViewOptions.jsx --- .../js/__tests__/components/ContentView/ContentViewOptionsSpec.js | 3 ++- web/src/js/components/ContentView/ContentViewOptions.jsx | 6 +----- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/web/src/js/__tests__/components/ContentView/ContentViewOptionsSpec.js b/web/src/js/__tests__/components/ContentView/ContentViewOptionsSpec.js index 0b1e8538..68afb4ec 100644 --- a/web/src/js/__tests__/components/ContentView/ContentViewOptionsSpec.js +++ b/web/src/js/__tests__/components/ContentView/ContentViewOptionsSpec.js @@ -3,6 +3,7 @@ import renderer from 'react-test-renderer' import ContentViewOptions from '../../../components/ContentView/ContentViewOptions' import { Provider } from 'react-redux' import { TFlow, TStore } from '../../ducks/tutils' +import { uploadContent } from '../../../ducks/flows' let tflow = new TFlow() @@ -11,7 +12,7 @@ describe('ContentViewOptions Component', () => { it('should render correctly', () => { let provider = renderer.create( - + ), tree = provider.toJSON() expect(tree).toMatchSnapshot() diff --git a/web/src/js/components/ContentView/ContentViewOptions.jsx b/web/src/js/components/ContentView/ContentViewOptions.jsx index 109fb861..e3cc39cd 100644 --- a/web/src/js/components/ContentView/ContentViewOptions.jsx +++ b/web/src/js/components/ContentView/ContentViewOptions.jsx @@ -4,7 +4,6 @@ import { connect } from 'react-redux' import ViewSelector from './ViewSelector' import UploadContentButton from './UploadContentButton' import DownloadContentButton from './DownloadContentButton' -import { uploadContent } from '../../ducks/flows' ContentViewOptions.propTypes = { flow: PropTypes.object.isRequired, @@ -29,8 +28,5 @@ export default connect( state => ({ contentViewDescription: state.ui.flow.viewDescription, readonly: !state.ui.flow.modifiedFlow, - }), - { - uploadContent: uploadContent - } + }) )(ContentViewOptions) -- cgit v1.2.3