Просмотр исходного кода

replyTo is overridable when sending email

Henry Oswald 12 лет назад
Родитель
Сommit
a9327cb7c5
1 измененных файлов с 9 добавлено и 1 удалено
  1. 9 1
      services/web/test/UnitTests/coffee/Email/EmailSenderTests.coffee

+ 9 - 1
services/web/test/UnitTests/coffee/Email/EmailSenderTests.coffee

@@ -34,7 +34,6 @@ describe "Email", ->
 			to: "bob@bob.com"
 			to: "bob@bob.com"
 			subject: "new email"
 			subject: "new email"
 			html: "<hello></hello>"
 			html: "<hello></hello>"
-			replyTo: "sarah@bob.com"
 
 
 	describe "sendEmail", ->
 	describe "sendEmail", ->
 
 
@@ -71,3 +70,12 @@ describe "Email", ->
 				args.replyTo.should.equal @settings.email.replyToAddress
 				args.replyTo.should.equal @settings.email.replyToAddress
 				done()
 				done()
 
 
+
+		it "should use the reply to address in options as an override", (done)->
+			@sesClient.sendemail.callsArgWith(1)
+
+			@opts.replyTo = "someone@else.com"
+			@sender.sendEmail @opts, =>
+				args = @sesClient.sendemail.args[0][0]
+				args.replyTo.should.equal @opts.replyTo
+				done()