diff --git a/services/web/app/coffee/Features/Email/EmailTemplator.coffee b/services/web/app/coffee/Features/Email/EmailBuilder.coffee similarity index 96% rename from services/web/app/coffee/Features/Email/EmailTemplator.coffee rename to services/web/app/coffee/Features/Email/EmailBuilder.coffee index b249fb49a7..6f74a62af4 100644 --- a/services/web/app/coffee/Features/Email/EmailTemplator.coffee +++ b/services/web/app/coffee/Features/Email/EmailBuilder.coffee @@ -10,6 +10,7 @@ templates = {} templates.welcome = subject: _.template "Welcome to ShareLaTeX" layout: PersonalEmailLayout + type:"lifecycle" compiledTemplate: _.template ''' Hi {{first_name}}, thanks for signing up to ShareLaTeX. If you ever get lost, you can log in again here.

@@ -25,6 +26,7 @@ ShareLaTeX Co-founder templates.canceledSubscription = subject: _.template "ShareLaTeX thoughts" layout: PersonalEmailLayout + type:"lifecycle" compiledTemplate: _.template ''' Hi {{first_name}}, @@ -40,6 +42,7 @@ ShareLaTeX Co-founder templates.passwordReset = subject: _.template "Password Reset - ShareLatex.com" layout: NotificationEmailLayout + type:"notification" compiledTemplate: _.template '''

Password Reset

@@ -55,6 +58,7 @@ please login here and then change templates.projectSharedWithYou = subject: _.template "{{owner.email}} wants to share {{project.name}} with you" layout: NotificationEmailLayout + type:"notification" compiledTemplate: _.template '''

{{owner.email}} wants to share '{{project.name}}' with you

 

@@ -81,5 +85,6 @@ module.exports = return { subject : template.subject(opts) html: template.layout(opts) + type:template.type } diff --git a/services/web/test/UnitTests/coffee/Email/EmailTemplatorTests.coffee b/services/web/test/UnitTests/coffee/Email/EmailBuilderTests.coffee similarity index 86% rename from services/web/test/UnitTests/coffee/Email/EmailTemplatorTests.coffee rename to services/web/test/UnitTests/coffee/Email/EmailBuilderTests.coffee index 6fe2f72b8d..3b13f99c25 100644 --- a/services/web/test/UnitTests/coffee/Email/EmailTemplatorTests.coffee +++ b/services/web/test/UnitTests/coffee/Email/EmailBuilderTests.coffee @@ -3,7 +3,7 @@ SandboxedModule = require('sandboxed-module') assert = require('assert') path = require('path') sinon = require('sinon') -modulePath = path.join __dirname, "../../../../app/js/Features/Email/EmailTemplator" +modulePath = path.join __dirname, "../../../../app/js/Features/Email/EmailBuilder" expect = require("chai").expect _ = require('underscore') _.templateSettings = @@ -14,7 +14,7 @@ describe "Email Templator ", -> beforeEach -> @settings = {} - @EmailTemplator = SandboxedModule.require modulePath, requires: + @EmailBuilder = SandboxedModule.require modulePath, requires: "settings-sharelatex":@settings "logger-sharelatex": log:-> @@ -24,7 +24,7 @@ describe "Email Templator ", -> @opts = to:"bob@bob.com" first_name:"bob" - @email = @EmailTemplator.buildEmail("welcome", @opts) + @email = @EmailBuilder.buildEmail("welcome", @opts) it "should insert the first_name into the template", -> @email.html.indexOf(@opts.first_name).should.not.equal -1 @@ -42,7 +42,7 @@ describe "Email Templator ", -> project: url:"http://www.project.com" name:"standard project" - @email = @EmailTemplator.buildEmail("projectSharedWithYou", @opts) + @email = @EmailBuilder.buildEmail("projectSharedWithYou", @opts) it "should insert the owner email into the template", -> @email.html.indexOf(@opts.owner.email).should.not.equal -1