mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
Also parse out login url
This commit is contained in:
parent
5f1aa4cc58
commit
263822d665
1 changed files with 3 additions and 1 deletions
|
@ -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) ->
|
||||
|
|
Loading…
Reference in a new issue