         inviteMembersFormCtrl.inviteContactsMessage = 'Message'
         inviteMembersFormCtrl.loading = true
 
-        promise = mocks.tgResources.memberships.bulkCreateMemberships.withArgs(
+        mocks.tgResources.memberships.bulkCreateMemberships.withArgs(
             1,
             [{
                 'role_id': 1

    _mockProjectService = () ->
        mocks.projectService = {
            project: sinon.stub()
        }

        provide.value "tgProjectService", mocks.projectService

            'Message'
        ).promise().resolve()

        mocks.projectService.fetchProject.withArgs().promise().resolve()

        inviteMembersFormCtrl.sendInvites().then () ->
            expect(inviteMembersFormCtrl.loading).to.be.false
            expect(mocks.rootScope.$broadcast).to.have.been.calledWith("membersform:new:success")
