import BankRecord from '../../../../common/records/Bank'
import QTIImportRecord from '../../../../common/records/QtiImport'

import HeaderMenu from '../index'

describe('HeaderMenu', () => {
  const ConnectedHeaderMenu = withContext(HeaderMenu, {calls: {}})
  const bank = new BankRecord({
    id: 1,
    title: 'Units of Measurement'
  })
  sinon.stub(bank, 'getLatestImport').returns(new QTIImportRecord())
  const testbed = createTestbed(ConnectedHeaderMenu, { bank: bank })

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

  shouldRenderComponent(testbed, {}, HeaderMenu)
})
