     it "timelineList should be an array", () ->
         $scope = $rootScope.$new()
 
-        mocks.userTimelineService.getUserTimeline = sinon.stub().returns(true)
+        mocks.userTimelineService.getUserTimeline = sinon.stub().returns({next: sinon.stub().promise()})
 
         myCtrl = controller("UserTimeline", $scope, {
-            user: Immutable.Map({id: 2})
+            user: Immutable.Map({id: 2}),
+            next: true
         })
 
         expect(myCtrl.timelineList.toJS()).is.an("array")
 
     describe "init timeline", () ->
         it "project timeline sequence", () ->
-            mocks.userTimelineService.getProjectTimeline = sinon.stub().withArgs(4).returns(true)
+            mocks.userTimelineService.getProjectTimeline =
+                sinon.stub().withArgs(4).returns({next: sinon.stub().promise()})
 
             $scope = $rootScope.$new()
 

                user: Immutable.Map({id: 2})
            })

            expect(myCtrl.timeline).to.be.true

        it "currentUser timeline sequence", () ->
            mocks.userTimelineService.getUserTimeline = sinon.stub().withArgs(2).returns(true)

            $scope = $rootScope.$new()


                user: Immutable.Map({id: 2})
            })

            expect(myCtrl.timeline).to.have.property('next')

    describe "load timeline", () ->
        myCtrl = null

        beforeEach () ->
            mocks.userTimelineService.getUserTimeline = sinon.stub().returns({next: sinon.stub().promise()})
            $scope = $rootScope.$new()
            myCtrl = controller("UserTimeline", $scope, {
                user: Immutable.Map({id: 2})
            })
            myCtrl.scrollDisabled = false

        it "enable scroll on loadTimeline if there are more pages", (done) ->
            response = Immutable.Map({
