|
@@ -111,7 +111,7 @@ describe 'ProjectCreationHandler', ->
|
|
|
project.spellCheckLanguage.should.equal "de"
|
|
project.spellCheckLanguage.should.equal "de"
|
|
|
done()
|
|
done()
|
|
|
|
|
|
|
|
- it "should set the imageName to currentImageName if set", (done) ->
|
|
|
|
|
|
|
+ it "should set the imageName to currentImageName if set and no imageName attribute", (done) ->
|
|
|
@Settings.currentImageName = "mock-image-name"
|
|
@Settings.currentImageName = "mock-image-name"
|
|
|
@handler.createBlankProject ownerId, projectName, (err, project)=>
|
|
@handler.createBlankProject ownerId, projectName, (err, project)=>
|
|
|
project.imageName.should.equal @Settings.currentImageName
|
|
project.imageName.should.equal @Settings.currentImageName
|
|
@@ -123,6 +123,14 @@ describe 'ProjectCreationHandler', ->
|
|
|
expect(project.imageName).to.not.exist
|
|
expect(project.imageName).to.not.exist
|
|
|
done()
|
|
done()
|
|
|
|
|
|
|
|
|
|
+ it "should set the imageName to the attribute value if set and not overwrite it with the currentImageName", (done) ->
|
|
|
|
|
+ @Settings.currentImageName = "mock-image-name"
|
|
|
|
|
+ attributes =
|
|
|
|
|
+ imageName: "attribute-image-name"
|
|
|
|
|
+ @handler.createBlankProject ownerId, projectName, attributes, (err, project)=>
|
|
|
|
|
+ project.imageName.should.equal attributes.imageName
|
|
|
|
|
+ done()
|
|
|
|
|
+
|
|
|
it "should not set the overleaf.history.display if not configured in settings", (done) ->
|
|
it "should not set the overleaf.history.display if not configured in settings", (done) ->
|
|
|
@Settings.apis.project_history.displayHistoryForNewProjects = false
|
|
@Settings.apis.project_history.displayHistoryForNewProjects = false
|
|
|
@handler.createBlankProject ownerId, projectName, (err, project)=>
|
|
@handler.createBlankProject ownerId, projectName, (err, project)=>
|