 	it "the project list", (done) ->
 		request {
 			url: buildUrl("project")
-			jar: @jar
 			headers:
 				"X-Forwarded-Proto": "https"
 		}, (error, response, body) ->

					email: Settings.smokeTest.user
					password: Settings.smokeTest.password
					_csrf: csrf
				jar: @jar
				headers:
					"X-Forwarded-Proto": "https"
			}, (error, response, body) ->

chai = require("chai")
chai.should()
expect = chai.expect
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) ->
		request.get {
			url: buildUrl("register")
			headers:
				"X-Forwarded-Proto": "https"
		}, (error, response, body) =>
