import { Map } from 'immutable'

import { changeItemFeedback } from '../../../../../common/actions/modifications'
import ItemFeedbackModal from '../index'

describe('ItemFeedbackModal Container', () => {
  const ConnectedItemFeedbackModal = withContext(ItemFeedbackModal)
  const testbed = createTestbed(ConnectedItemFeedbackModal, {
    modalOpen: true,
    closeModal: sinon.stub(),
    changeItemFeedback: changeItemFeedback,
    feedback: Map()
  })

  useFakeFetching({
    dispatchStub: sinon.stub(),
    getStateStub: sinon.stub(),
    fetchStub: sinon.stub()
  })

  shouldRenderComponent(testbed, {}, ItemFeedbackModal)
})
