       expect($scope.activity).toEqual activityResponse
 
     it 'loads latest fitbit api activity time series data into the chart', ->
+      $timeout.flush()
       expect($scope.stepChartConfig.data.json).toEqual tsActivityResponse['activities-tracker-steps']
 
     it 'loads latest fitbit api sleep time series data into the chart', ->
+      $timeout.flush()
       expect($scope.sleepChartConfig.data.json).toEqual tsSleepResponse['sleep-minutesAsleep']
 
     it 'defaults the time series data to 1 week', ->
+      $timeout.flush()
       expect(fitbitStub.activity_time_series_data).toHaveBeenCalledWith('1w')
       expect(fitbitStub.sleep_time_series_data).toHaveBeenCalledWith('1w')
 


    it 'get the data for the new time frame', ->
      $scope.setTimeFrame('1m')
      expect(fitbitStub.activity_time_series_data).toHaveBeenCalledWith('1m')
      expect(fitbitStub.sleep_time_series_data).toHaveBeenCalledWith('1m')


describe 'Fitness Controller', ->
  $scope = $timeout = null
  userResponse = {"member_since":"2012-12-13",
  "avatar_url":"https://cloudfront.net/50_square.jpg",
  "city":"Denver","state":"CO","height":80,
