do null check on csrf token in smoke test
This commit is contained in:
@@ -18,7 +18,11 @@ describe "Opening", ->
|
||||
"""
|
||||
child.exec command, (err, stdout, stderr)->
|
||||
if err? then done(err)
|
||||
csrf = stdout.match("<input name=\"_csrf\" type=\"hidden\" value=\"(.*?)\">")[1]
|
||||
csrfMatches = stdout.match("<input name=\"_csrf\" type=\"hidden\" value=\"(.*?)\">")
|
||||
if !csrfMatches?
|
||||
logger.err stdout:stdout, "smoke test: does not hace csrf token"
|
||||
return("smoke test: does not hace csrf token")
|
||||
csrf = csrfMatches[1]
|
||||
|
||||
# Change cookie to be non secure so curl will send it
|
||||
fs = require("fs")
|
||||
|
||||
Reference in New Issue
Block a user