overleaf/services/filestore/test/unit/coffee/SettingsTests.coffee

20 lines
565 B
CoffeeScript
Raw Normal View History

assert = require("chai").assert
sinon = require('sinon')
chai = require('chai')
should = chai.should()
expect = chai.expect
modulePath = "../../../app/js/BucketController.js"
describe "Settings", ->
describe "s3", ->
it "should use JSONified env var if present", (done)->
s3_settings =
bucket1:
auth_key: 'bucket1_key'
auth_secret: 'bucket1_secret'
2018-07-10 09:55:40 -04:00
process.env['S3_BUCKET_CREDENTIALS'] = JSON.stringify s3_settings
2018-07-10 09:55:40 -04:00
settings = require("settings-sharelatex")
expect(settings.filestore.s3BucketCreds).to.deep.equal s3_settings
done()