title: redux unit testing Store.dispatch()
body: <p>i have a basic react component like this.</p>
  
  <pre><code>import React from 'react';
  import store from 'src/home/store';
  class PageLoading extends React.Component {
      constructor(props) {
          super(props);
          this.state = {
              message: this.props.message
          };
      }
  
      componentDidMount(){
          store.dispatch({ type: 'SET_NOTIFICATION_DIALOG', status: '200', message: this.state.message, model: 'LOADING' });
      }
  
      render(){
          return(&lt;div /&gt;);
      }
  }
  
  
  export default PageLoading;
  </code></pre>
  
  <p>how to unit this component ..?</p>
  
  <p>i am using karma with ezyme.
  i have written this below code but this is not working </p>
  
  <pre><code>import configureMockStore from 'redux-mock-store';
  import PageLoading from 'src/home/components/PageLoading';
  
  const middlewares = [];
  const mockStore = configureMockStore(middlewares);
  
  Enzyme.configure({ adapter: new Adapter() });
  
  describe("Page Loading",()=&gt;{
      it("testing shoul dispatch action on calling componentdid mount",()=&gt;{
          const initialState = {}
          const store = mockStore(initialState)
          const wrapper = mount(&lt;PageLoading message="loading"/&gt;);
           const actions = store.getActions();
          const expectedPayload = {type: 'SET_NOTIFICATION_DIALOG', status: '200', message:"loading", model: 'LOADING' };
           expect(actions).toEqual([expectedPayload])
      })
  })
  </code></pre>
  
  <p>i think it is not getting the store. </p>