Skip to content

Commit

Permalink
Use PhotoStreamContainer within App component
Browse files Browse the repository at this point in the history
  • Loading branch information
gmsecrieru committed Jun 12, 2018
1 parent e4578fa commit 29b6d76
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 17 deletions.
13 changes: 2 additions & 11 deletions src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,14 @@ import React, { Component } from 'react';

import './App.css'

import PhotoGrid from './components/PhotoGrid'
import PhotoStreamContainer from './containers/PhotoStreamContainer'

class App extends Component {
render() {
const photos = [
{ url: 'http://via.placeholder.com/320' },
{ url: 'http://via.placeholder.com/320' },
{ url: 'http://via.placeholder.com/320' },
{ url: 'http://via.placeholder.com/320' },
{ url: 'http://via.placeholder.com/320' },
{ url: 'http://via.placeholder.com/320' },
]

return (
<div className="app">
<h1>Photo Gallery</h1>
<PhotoGrid photos={photos} />
<PhotoStreamContainer />
</div>
);
}
Expand Down
15 changes: 9 additions & 6 deletions src/App.test.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
import React from 'react';
import ReactDOM from 'react-dom';
import { mount } from 'enzyme'

import App from './App';
import PhotoStreamContainer from './containers/PhotoStreamContainer';

it('renders without crashing', () => {
const div = document.createElement('div');
ReactDOM.render(<App />, div);
ReactDOM.unmountComponentAtNode(div);
});
describe('App', () => {
it('renders without crashing', () => {
const subject = mount(<App />)
expect(subject.find(PhotoStreamContainer).length).toBe(1)
})
})

0 comments on commit 29b6d76

Please sign in to comment.