mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-14 06:03:45 +01:00
Merge branch 'master' of github.com:sharelatex/web-sharelatex
This commit is contained in:
@@ -1,18 +1,23 @@
|
||||
chai = require("chai")
|
||||
chai.should()
|
||||
expect = chai.expect
|
||||
request = require "request"
|
||||
Settings = require "settings-sharelatex"
|
||||
|
||||
# Monkey patch request cookies, because the new tough-cookie module
|
||||
# assumes it's not a secure cookie if the url is not HTTPS
|
||||
request = require "request"
|
||||
jar = request.jar()
|
||||
jar.getCookieString = (uri) ->
|
||||
return @_jar.getCookieStringSync uri, secure: true
|
||||
request = request.defaults jar: jar
|
||||
|
||||
port = Settings.internal?.web?.port or Settings.port or 3000
|
||||
buildUrl = (path) -> "http://localhost:#{port}/#{path}"
|
||||
|
||||
describe "Opening", ->
|
||||
before (done) ->
|
||||
@jar = request.jar()
|
||||
request.get {
|
||||
url: buildUrl("register")
|
||||
jar: @jar
|
||||
headers:
|
||||
"X-Forwarded-Proto": "https"
|
||||
}, (error, response, body) =>
|
||||
@@ -23,7 +28,6 @@ describe "Opening", ->
|
||||
email: Settings.smokeTest.user
|
||||
password: Settings.smokeTest.password
|
||||
_csrf: csrf
|
||||
jar: @jar
|
||||
headers:
|
||||
"X-Forwarded-Proto": "https"
|
||||
}, (error, response, body) ->
|
||||
@@ -33,7 +37,6 @@ describe "Opening", ->
|
||||
it "a project", (done) ->
|
||||
request {
|
||||
url: buildUrl("project/#{Settings.smokeTest.projectId}")
|
||||
jar: @jar
|
||||
headers:
|
||||
"X-Forwarded-Proto": "https"
|
||||
}, (error, response, body) ->
|
||||
@@ -47,7 +50,6 @@ describe "Opening", ->
|
||||
it "the project list", (done) ->
|
||||
request {
|
||||
url: buildUrl("project")
|
||||
jar: @jar
|
||||
headers:
|
||||
"X-Forwarded-Proto": "https"
|
||||
}, (error, response, body) ->
|
||||
|
||||
Reference in New Issue
Block a user