overleaf/services/web/test/acceptance/coffee/CloseSiteTests.coffee
Ersun Warncke 81e3db260c Merge pull request #1472 from sharelatex/ew-add-close-site-and-private-disconnect-route
Add close site setting and private disconnect all users route

GitOrigin-RevId: d078c053ba4e5f5c048f30f2a6d509966736b3e0
2019-02-06 14:24:52 +00:00

22 lines
599 B
CoffeeScript

Settings = require "settings-sharelatex"
chai = require "chai"
request = require "./helpers/request"
describe "siteIsOpen", ->
describe "when siteIsOpen is default (true)", ->
it "should get page", (done) ->
request.get "/login", (error, response, body) ->
response.statusCode.should.equal 200
done()
describe "when siteIsOpen is false", ->
beforeEach ->
Settings.siteIsOpen = false
afterEach ->
Settings.siteIsOpen = true
it "should return maintenance page", (done) ->
request.get "/login", (error, response) ->
response.statusCode.should.equal 503
done()