 		expect(response.headers.location).to.equal "/project/#{invite.projectId}"
 		callback()
 
-expectAcceptInviteAndRedirect = (user, invite, callback=()->) ->
+expectAcceptInviteAndRedirect = (user, invite, callback=(err,result)->) ->
 	# should accept the invite and redirect to project
 	tryAcceptInvite user, invite, (err, response, body) =>
 		expect(err).to.be.oneOf [null, undefined]

					Async.series [
						(cb) => expectInviteRedirectToRegister(@user, @link, cb)
					], done

		expect(body).to.match new RegExp("<title>Project Invite - .*</title>")
		callback()

expectInvalidInvitePage = (user, link, callback=(err,result)->) ->
	# view invalid invite
	tryFollowInviteLink user, link, (err, response, body) ->
		expect(err).to.be.oneOf [null, undefined]
