 			"logger-sharelatex": @logger = {warn: sinon.stub()}
 		@req =
 			params: {}
-			session: {}
 		@res =
 			status: sinon.stub()
 			write: sinon.stub()

				doc_id: @doc_id = "doc-id"
			}
			
		describe "when under the rate limit with logged in user", ->
			beforeEach ->
				@req.session.user = { _id: @user_id = "user-id" }
				@RateLimiter.addCount = sinon.stub().callsArgWith(1, null, true)
				@rateLimiter(@req, @res, @next)
				

				
		describe "when over the rate limit", ->
			beforeEach ->
				@req.session  = 
					user : 
						_id: @user_id = "user-id"
				@RateLimiter.addCount = sinon.stub().callsArgWith(1, null, false)
				@rateLimiter(@req, @res, @next)
				
