mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-06-03 14:19:01 +02:00
This reverts commit 34ab7e4ea6dd1b5fd749f9accaf4a6e16ae1d840. GitOrigin-RevId: 005de52bcacbacf62d22cd8617d7a765f56bd72e
This commit is contained in:
committed by
Copybot
parent
1ef205c094
commit
03616a802e
@@ -11,7 +11,6 @@ describe('HttpController', function () {
|
||||
'./HistoryManager': (this.HistoryManager = {
|
||||
flushProjectChangesAsync: sinon.stub(),
|
||||
}),
|
||||
'./ProjectHistoryRedisManager': (this.ProjectHistoryRedisManager = {}),
|
||||
'./ProjectManager': (this.ProjectManager = {}),
|
||||
'./ProjectFlusher': { flushAllProjects() {} },
|
||||
'./DeleteQueueManager': (this.DeleteQueueManager = {}),
|
||||
@@ -652,7 +651,6 @@ describe('HttpController', function () {
|
||||
|
||||
describe('deleteComment', function () {
|
||||
beforeEach(function () {
|
||||
this.user_id = 'user-id-123'
|
||||
this.req = {
|
||||
params: {
|
||||
project_id: this.project_id,
|
||||
@@ -660,9 +658,7 @@ describe('HttpController', function () {
|
||||
comment_id: (this.comment_id = 'mock-comment-id'),
|
||||
},
|
||||
query: {},
|
||||
body: {
|
||||
user_id: this.user_id,
|
||||
},
|
||||
body: {},
|
||||
}
|
||||
})
|
||||
|
||||
@@ -670,20 +666,13 @@ describe('HttpController', function () {
|
||||
beforeEach(function () {
|
||||
this.DocumentManager.deleteCommentWithLock = sinon
|
||||
.stub()
|
||||
.callsArgWith(4)
|
||||
|
||||
this.ProjectHistoryRedisManager.queueOps = sinon.stub()
|
||||
.callsArgWith(3)
|
||||
this.HttpController.deleteComment(this.req, this.res, this.next)
|
||||
})
|
||||
|
||||
it('should accept the change', function () {
|
||||
this.DocumentManager.deleteCommentWithLock
|
||||
.calledWith(
|
||||
this.project_id,
|
||||
this.doc_id,
|
||||
this.comment_id,
|
||||
this.user_id
|
||||
)
|
||||
.calledWith(this.project_id, this.doc_id, this.comment_id)
|
||||
.should.equal(true)
|
||||
})
|
||||
|
||||
@@ -713,7 +702,7 @@ describe('HttpController', function () {
|
||||
beforeEach(function () {
|
||||
this.DocumentManager.deleteCommentWithLock = sinon
|
||||
.stub()
|
||||
.callsArgWith(4, new Error('oops'))
|
||||
.callsArgWith(3, new Error('oops'))
|
||||
this.HttpController.deleteComment(this.req, this.res, this.next)
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user