 {Testing, sinon, _, React, ReactTestUtils} = require 'shared/specs/helpers'
 
-{ConceptCoach}    = require 'concept-coach/base'
+jest.mock '../../src/navigation/model'
+
 ErrorNotification = require 'concept-coach/error-notification'
 
 TASK  = require '../../api/cc/tasks/C_UUID/m_uuid/GET'

    wrapper = shallow(<ErrorNotification {...@props} />)
    msg = 'undefined var foo used in bar'
    api.channel.emit('error', new Error(msg))
    console.log wrapper.debug()
    expect(wrapper.find('ModalBody').render().text()).to.include("Error: #{msg}")
    undefined

  it 'shows error details by default', ->
    wrapper = shallow(<ErrorNotification {...@props} />)
    api.channel.emit('error', ERROR)
    expect(wrapper.find('ModalTitle').render().text()).to.equal('Server Error encountered')
    expect(wrapper.find('ModalBody').render().text()).to.include('test_test_test')
    undefined

  it 'renders course not started', ->

    data:
      errors: [ {code: 'test_test_test'} ]

Navigation = null

describe 'CC Error Notification Component', ->
  beforeEach ->
    Navigation = require '../../src/navigation/model'
    @props =
      course: new Course(_.first(AUTH_DATA.courses))
      close: sinon.spy()
