mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
get local file writer tests using fake settings
This commit is contained in:
parent
c8c758642a
commit
04bffaeceb
1 changed files with 4 additions and 0 deletions
|
@ -18,11 +18,15 @@ describe "LocalFileWriter", ->
|
||||||
@fs =
|
@fs =
|
||||||
createWriteStream : sinon.stub().returns(@writeStream)
|
createWriteStream : sinon.stub().returns(@writeStream)
|
||||||
unlink: sinon.stub()
|
unlink: sinon.stub()
|
||||||
|
@settings =
|
||||||
|
path:
|
||||||
|
uploadFolder:"somewhere"
|
||||||
@writer = SandboxedModule.require modulePath, requires:
|
@writer = SandboxedModule.require modulePath, requires:
|
||||||
"fs": @fs
|
"fs": @fs
|
||||||
"logger-sharelatex":
|
"logger-sharelatex":
|
||||||
log:->
|
log:->
|
||||||
err:->
|
err:->
|
||||||
|
"settings-sharelatex":@settings
|
||||||
@stubbedFsPath = "something/uploads/eio2k1j3"
|
@stubbedFsPath = "something/uploads/eio2k1j3"
|
||||||
|
|
||||||
describe "writeStrem", ->
|
describe "writeStrem", ->
|
||||||
|
|
Loading…
Reference in a new issue