mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-14 06:03:45 +01:00
This reverts commit f8396a3caadd536edf64c6f971c77f4c941f000a. GitOrigin-RevId: 8d66aa15a29216736755c3f86954a4d40aa20a6c
This commit is contained in:
committed by
Copybot
parent
9cc2a7f1e0
commit
da7569e892
@@ -92,7 +92,7 @@ describe('HttpController', function () {
|
||||
beforeEach(function () {
|
||||
this.blobHash = 'abcd'
|
||||
this.stream = {}
|
||||
this.historyId = new ObjectId().toString()
|
||||
this.historyId = 1337
|
||||
this.HistoryStoreManager.getProjectBlobStream.yields(null, this.stream)
|
||||
this.HttpController.getProjectBlob(
|
||||
{ params: { history_id: this.historyId, hash: this.blobHash } },
|
||||
@@ -414,7 +414,7 @@ describe('HttpController', function () {
|
||||
project_id: this.projectId,
|
||||
},
|
||||
body: {
|
||||
version: (this.version = 1),
|
||||
version: (this.version = 'label-1'),
|
||||
comment: (this.comment = 'a comment'),
|
||||
created_at: (this.created_at = Date.now().toString()),
|
||||
validate_exists: true,
|
||||
@@ -486,12 +486,11 @@ describe('HttpController', function () {
|
||||
|
||||
describe('deleteLabelForUser', function () {
|
||||
beforeEach(function () {
|
||||
this.label_id = new ObjectId()
|
||||
this.req = {
|
||||
params: {
|
||||
project_id: this.projectId,
|
||||
user_id: this.userId,
|
||||
label_id: this.label_id.toString(),
|
||||
label_id: (this.label_id = new ObjectId()),
|
||||
},
|
||||
}
|
||||
this.HttpController.deleteLabelForUser(this.req, this.res, this.next)
|
||||
@@ -499,7 +498,7 @@ describe('HttpController', function () {
|
||||
|
||||
it('should delete a label for a project', function () {
|
||||
this.LabelsManager.deleteLabelForUser
|
||||
.calledWith(this.projectId, this.userId, this.label_id.toString())
|
||||
.calledWith(this.projectId, this.userId, this.label_id)
|
||||
.should.equal(true)
|
||||
})
|
||||
|
||||
@@ -510,11 +509,10 @@ describe('HttpController', function () {
|
||||
|
||||
describe('deleteLabel', function () {
|
||||
beforeEach(function () {
|
||||
this.label_id = new ObjectId()
|
||||
this.req = {
|
||||
params: {
|
||||
project_id: this.projectId,
|
||||
label_id: this.label_id.toString(),
|
||||
label_id: (this.label_id = new ObjectId()),
|
||||
},
|
||||
}
|
||||
this.HttpController.deleteLabel(this.req, this.res, this.next)
|
||||
@@ -522,7 +520,7 @@ describe('HttpController', function () {
|
||||
|
||||
it('should delete a label for a project', function () {
|
||||
this.LabelsManager.deleteLabel
|
||||
.calledWith(this.projectId, this.label_id.toString())
|
||||
.calledWith(this.projectId, this.label_id)
|
||||
.should.equal(true)
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user