import React from 'react';
import renderer from 'react-test-renderer';
import {Provider} from 'react-redux';
import {combineReducers} from 'redux';
import {reducers} from '@ciscospark/widget-message';
import {initStore} from '@ciscospark/widget-base';

import ReadReceipts from '.';

describe('ReadReceipts container', () => {
  it('renders properly', () => {
    const store = initStore(combineReducers(reducers));
    const component = renderer.create(
      <Provider store={store}>
        <ReadReceipts />
      </Provider>
    );
    expect(component).toMatchSnapshot();
  });
});

@@ -68,85 +68,8 @@
 r';%0A
-import %7BProvider%7D from 'react-redux';%0Aimport %7BcombineReducers%7D from 'redux';%0A
 impo
@@ -125,24 +125,31 @@
 import %7B
-initStor
+withInitialStat
 e%7D from 
@@ -157,24 +157,30 @@
 @ciscospark/
+spark-
 widget-base'
@@ -303,165 +303,145 @@
 nst 
-store = initStore(combineReducers(reducers));%0A    const component = renderer.create(%0A      %3CProvider store=%7Bstore%7D%3E%0A        %3CReadReceipts /%3E%0A      %3C/Provider
+ReadReceiptsComponent = withInitialState(%7Breducers%7D)(ReadReceipts);%0A    const component = renderer.create(%0A      %3CReadReceiptsComponent /
 %3E%0A  

Simplify container test