mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
81e3db260c
Add close site setting and private disconnect all users route GitOrigin-RevId: d078c053ba4e5f5c048f30f2a6d509966736b3e0
22 lines
599 B
CoffeeScript
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()
|