     expect(cfpLoadingBar.status()).toBe 1
     cfpLoadingBar.complete() # set as complete
     $timeout.flush()
+    $animate.triggerCallbacks()
+
 
     $http.get(endpoint).then (data) ->
       result = data

    expect(startedEventCalled).toBe 1 # Should still be one, as complete was never called:
    cfpLoadingBar.complete()
    $timeout.flush()

    cfpLoadingBar.start()
    expect(startedEventCalled).toBe 2


describe 'loadingBarInterceptor Service', ->

  $http = $httpBackend = $document = $timeout = result = loadingBar = $animate = null
  response = {message:'OK'}
  endpoint = '/service'

  beforeEach ->
    module 'ngAnimateMock', 'chieffancypants.loadingBar', (cfpLoadingBarProvider) ->
      loadingBar = cfpLoadingBarProvider
      return

    result = null
    inject (_$http_, _$httpBackend_, _$document_, _$timeout_, _$animate_) ->
      $http = _$http_
      $httpBackend = _$httpBackend_
      $document = _$document_
      $timeout = _$timeout_
      $animate = _$animate_

  beforeEach ->
    this.addMatchers
