 				@NotificationsBuilder.groupPlan.calledWith(@user, {subscription_id:@subscription._id}).should.equal true
 				@readStub.called.should.equal true
 				done()
-		
+
 		it "should add an email invite if no user is found", (done) ->
 			@UserGetter.getUserByMainEmail.callsArgWith(1, null, null)
 			@Handler.addUserToGroup @adminUser_id, @newEmail, (err)=>

				done()

		it "should return any invited users", (done) ->
			@subscription.teamInvites = [
				{ email: "jo@example.com" },
				{ email: "charlie@example.com" }
			]
			@Handler.getPopulatedListOfMembers @adminUser_id, (err, users)=>
				users[0].email.should.equal "jo@example.com"
				users[0].holdingAccount.should.equal true
				users[1].email.should.equal "charlie@example.com"
				users[1].holdingAccount.should.equal true
				users.length.should.equal @subscription.teamInvites.length
				done()

	describe "isUserPartOfGroup", ->

		beforeEach ->
			@LimitationsManager.hasGroupMembersLimitReached.callsArgWith(1, null, false, @subscription)
			@UserGetter.getUserByMainEmail.callsArgWith(1, null, @user)

		it "should find the user", (done)->
			@Handler.addUserToGroup @adminUser_id, @newEmail, (err)=>
				@UserGetter.getUserByMainEmail.calledWith(@newEmail).should.equal true
