|
|
@@ -1142,24 +1142,15 @@ describe('ProjectStructureChanges', function() {
|
|
|
})
|
|
|
|
|
|
it('should clear rootDoc_id', function(done) {
|
|
|
- deleteItem(
|
|
|
- owner,
|
|
|
- this.exampleProjectId,
|
|
|
- 'doc',
|
|
|
- this.exampleDocId,
|
|
|
- () => {
|
|
|
- ProjectGetter.getProject(
|
|
|
- this.exampleProjectId,
|
|
|
- (error, project) => {
|
|
|
- if (error) {
|
|
|
- throw error
|
|
|
- }
|
|
|
- expect(project.rootDoc_id).to.be.undefined
|
|
|
- done()
|
|
|
- }
|
|
|
- )
|
|
|
- }
|
|
|
- )
|
|
|
+ deleteItem(owner, this.exampleProjectId, 'doc', this.exampleDocId, () => {
|
|
|
+ ProjectGetter.getProject(this.exampleProjectId, (error, project) => {
|
|
|
+ if (error) {
|
|
|
+ throw error
|
|
|
+ }
|
|
|
+ expect(project.rootDoc_id).to.be.undefined
|
|
|
+ done()
|
|
|
+ })
|
|
|
+ })
|
|
|
})
|
|
|
})
|
|
|
|
|
|
@@ -1174,26 +1165,17 @@ describe('ProjectStructureChanges', function() {
|
|
|
})
|
|
|
|
|
|
it('should not clear rootDoc_id', function(done) {
|
|
|
- deleteItem(
|
|
|
- owner,
|
|
|
- this.exampleProjectId,
|
|
|
- 'doc',
|
|
|
- this.exampleDocId,
|
|
|
- () => {
|
|
|
- ProjectGetter.getProject(
|
|
|
- this.exampleProjectId,
|
|
|
- (error, project) => {
|
|
|
- if (error) {
|
|
|
- throw error
|
|
|
- }
|
|
|
- expect(project.rootDoc_id.toString()).to.equal(
|
|
|
- this.exampleRootDocId.toString()
|
|
|
- )
|
|
|
- done()
|
|
|
- }
|
|
|
+ deleteItem(owner, this.exampleProjectId, 'doc', this.exampleDocId, () => {
|
|
|
+ ProjectGetter.getProject(this.exampleProjectId, (error, project) => {
|
|
|
+ if (error) {
|
|
|
+ throw error
|
|
|
+ }
|
|
|
+ expect(project.rootDoc_id.toString()).to.equal(
|
|
|
+ this.exampleRootDocId.toString()
|
|
|
)
|
|
|
- }
|
|
|
- )
|
|
|
+ done()
|
|
|
+ })
|
|
|
+ })
|
|
|
})
|
|
|
})
|
|
|
})
|