 			@user =
 				_id: ObjectId()
 			@req.user = @user
+			@req.session.user = @user
 			@UserInfoController.sendFormattedPersonalInfo = sinon.stub()
+			@UserGetter.getUser = sinon.stub().callsArgWith(2, null, @user)
 			@UserInfoController.getLoggedInUsersPersonalInfo(@req, @res, @next)
 
 		it "should call sendFormattedPersonalInfo", ->

				email: "doug@sharelatex.com"
				password: "should-not-get-included"
				signUpDate: new Date()
			@UserInfoController._formatPersonalInfo @user, (error, info) =>
				expect(info).to.deep.equal {
					id: @user._id.toString()

					last_name: @user.last_name
					email: @user.email
					signUpDate: @user.signUpDate
					role: @user.role
					institution: @user.institution
				}

	describe "setPersonalInfo", ->
