     $httpBackend.expectPOST(endpoint).respond response
     $http.post(endpoint, {message: 'post'}).then (data) ->
       result = data
-    expect(cfpLoadingBar.status()).toBe 0
+
+    expect(cfpLoadingBar.status()).toBe 0
+    $timeout.flush()
+    $timeout.flush()
     $httpBackend.flush()
     expect(cfpLoadingBar.status()).toBe 1
     $timeout.flush()

      result = data

    expect(cfpLoadingBar.status()).toBe 0
    $httpBackend.flush(1)
    expect(cfpLoadingBar.status()).toBe 1
    cfpLoadingBar.complete() # set as complete

      result = data

    expect(cfpLoadingBar.status()).toBe 0
    $timeout.flush()
    $timeout.flush()
    $httpBackend.flush(1)
    expect(cfpLoadingBar.status()).toBe 1
    cfpLoadingBar.complete() # set as complete
