 						collaborators: 3
 						dropbox: false
 						versioning: false
-				stubbedUser = { 
-					refered_user_count: @refered_user_count, 
-					features:{collaborators:1, dropbox:false, versioning:false} 
+				stubbedUser = {
+					refered_user_count: @refered_user_count,
+					features:{collaborators:1, dropbox:false, versioning:false}
 				}
 
-				@User.findOne = sinon.stub().callsArgWith 1, null, stubbedUser
+				@UserGetter.getUserOrUserStubById = sinon.stub().yields null, stubbedUser
 				@ReferalFeatures.getBonusFeatures @user_id, @callback
 
 			it "should get the users number of refered user", ->
-				@User.findOne
-					.calledWith(_id: @user_id)
+				@UserGetter.getUserOrUserStubById
+					.calledWith(@user_id, { _id: 1 })
 					.should.equal true
 
 			it "should call the callback with the features", ->


	beforeEach ->
		@ReferalFeatures = SandboxedModule.require modulePath, requires:
			'../../models/User': User: @User = {}
			"settings-sharelatex": @Settings = {}
			'logger-sharelatex':
				log:->

						collaborators: 3
						dropbox: false
						versioning: false
				@UserGetter.getUserOrUserStubById =
					sinon.stub().yields null, { refered_user_count: @refered_user_count }
				@ReferalFeatures.getBonusFeatures @user_id, @callback

			it "should get the users number of refered user", ->
				@UserGetter.getUserOrUserStubById
					.calledWith(@user_id, { _id: 1 })
					.should.equal true

			it "should call the callback with no features", ->
				@callback.calledWith(null, {}).should.equal true
