From c26b001ebcf43c3bdc18d1afcfbafa87b0b18366 Mon Sep 17 00:00:00 2001 From: Douwe Maan Date: Tue, 14 Apr 2015 12:52:33 +0200 Subject: Set EmailsOnPush reply-to address to committer email when enabled. --- spec/mailers/notify_spec.rb | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'spec/mailers') diff --git a/spec/mailers/notify_spec.rb b/spec/mailers/notify_spec.rb index 6bea0321cb9..b297fbd5119 100644 --- a/spec/mailers/notify_spec.rb +++ b/spec/mailers/notify_spec.rb @@ -725,6 +725,11 @@ describe Notify do sender = subject.header[:from].addrs[0] expect(sender.address).to eq(user.email) end + + it "is set to reply to the committer email" do + sender = subject.header[:reply_to].addrs[0] + expect(sender.address).to eq(user.email) + end end context "when the committer email domain is not completely within the GitLab domain" do @@ -738,6 +743,11 @@ describe Notify do sender = subject.header[:from].addrs[0] expect(sender.address).to eq(gitlab_sender) end + + it "is set to reply to the default email" do + sender = subject.header[:reply_to].addrs[0] + expect(sender.address).to eq(gitlab_sender_reply_to) + end end context "when the committer email domain is outside the GitLab domain" do @@ -751,6 +761,11 @@ describe Notify do sender = subject.header[:from].addrs[0] expect(sender.address).to eq(gitlab_sender) end + + it "is set to reply to the default email" do + sender = subject.header[:reply_to].addrs[0] + expect(sender.address).to eq(gitlab_sender_reply_to) + end end end end -- cgit v1.2.1