From 263822d665738fa0a1d86e0f52f26a6b6cb86931 Mon Sep 17 00:00:00 2001 From: Shane Kilkelly Date: Mon, 1 Aug 2016 13:54:49 +0100 Subject: [PATCH] Also parse out login url --- services/web/test/acceptance/coffee/ProjectInviteTests.coffee | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/services/web/test/acceptance/coffee/ProjectInviteTests.coffee b/services/web/test/acceptance/coffee/ProjectInviteTests.coffee index 17fbea57c0..b3bcb762e9 100644 --- a/services/web/test/acceptance/coffee/ProjectInviteTests.coffee +++ b/services/web/test/acceptance/coffee/ProjectInviteTests.coffee @@ -110,8 +110,10 @@ expectInviteRedirectToRegister = (user, link, callback=(err,result)->) -> # follow redirect to register page and extract the redirectUrl from form user.request.get response.headers.location, (err, response, body) -> redirectUrl = body.match(/input name="redir" type="hidden" value="([^"]*)"/m)?[1] + loginUrl = body.match(/href="([^"]*)">\s*Login here/m)?[1] expect(redirectUrl).to.not.be.oneOf [null, undefined] - callback(null, redirectUrl) + expect(loginUrl).to.not.be.oneOf [null, undefined] + callback(null, redirectUrl, loginUrl) expectRegistrationRedirectToInvite = (user, email, redir, link, callback=(err, result)->) -> tryRegisterUser user, email, redir, (err, response, body) ->