mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-23 17:19:37 +02:00
Merge pull request #11804 from overleaf/jpa-fix-fs-persistor-nested-layout
[object-persistor] forward settings.useSubdirectories to FSPersistor GitOrigin-RevId: 92cef51c392cfeaebbcca2597740562c1f3fc95f
This commit is contained in:
@@ -10,6 +10,10 @@ describe('PersistorManager', function () {
|
||||
|
||||
beforeEach(function () {
|
||||
FSPersistor = class {
|
||||
constructor(settings) {
|
||||
this.settings = settings
|
||||
}
|
||||
|
||||
wrappedMethod() {
|
||||
return 'FSPersistor'
|
||||
}
|
||||
@@ -60,6 +64,20 @@ describe('PersistorManager', function () {
|
||||
expect(PersistorFactory(Settings).wrappedMethod()).to.equal('FSPersistor')
|
||||
})
|
||||
|
||||
it('should forward useSubdirectories=true to FSPersistor', function () {
|
||||
Settings.backend = 'fs'
|
||||
Settings.useSubdirectories = true
|
||||
|
||||
expect(PersistorFactory(Settings).settings.useSubdirectories).to.be.true
|
||||
})
|
||||
|
||||
it('should forward useSubdirectories=false to FSPersistor', function () {
|
||||
Settings.backend = 'fs'
|
||||
Settings.useSubdirectories = false
|
||||
|
||||
expect(PersistorFactory(Settings).settings.useSubdirectories).to.be.false
|
||||
})
|
||||
|
||||
it('should throw an error when the backend is not configured', function () {
|
||||
try {
|
||||
PersistorFactory(Settings)
|
||||
|
||||
Reference in New Issue
Block a user