mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-31 21:01:33 +02:00
added failing test for trying to archive load of docs which are already
in s3
This commit is contained in:
@@ -155,6 +155,23 @@ describe "DocArchiveManager", ->
|
||||
err.should.equal @error
|
||||
done()
|
||||
|
||||
describe "when most have been already put in s3", ->
|
||||
|
||||
beforeEach ->
|
||||
numberOfDocs = 10 * 1000
|
||||
@mongoDocs = []
|
||||
while --numberOfDocs != 0
|
||||
@mongoDocs.push({inS3:true, _id: ObjectId()})
|
||||
|
||||
@MongoManager.getProjectsDocs = sinon.stub().callsArgWith(1, null, @mongoDocs)
|
||||
@DocArchiveManager.archiveDoc = sinon.stub().callsArgWith(2, null)
|
||||
|
||||
it "should not throw and error", (done)->
|
||||
@DocArchiveManager.archiveAllDocs @project_id, (err)=>
|
||||
err.should.not.exist
|
||||
done()
|
||||
|
||||
|
||||
describe "unArchiveAllDocs", ->
|
||||
|
||||
it "should unarchive all inS3 docs", (done)->
|
||||
|
||||
Reference in New Issue
Block a user