mirror of
https://github.com/wahyd4/gitlabhq.git
synced 2026-08-10 21:26:07 +10:00
Make Reply-To config apply to change e-mail confirmation and other notifications
sent through Devise Fix test case that was passing due to a broken `around` statement. Closes #1556
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
Please view this file on the master branch, on stable branches it's out of date.
|
||||
|
||||
v 7.11.0 (unreleased)
|
||||
- Make Reply-To config apply to change e-mail confirmation and other Devise notifications (Stan Hu)
|
||||
- Don't allow a merge request to be merged when its title starts with "WIP".
|
||||
- Get Gitorious importer to work again.
|
||||
- Fix clone URL field and X11 Primary selection (Dmitry Medvinsky)
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
class DeviseMailer < Devise::Mailer
|
||||
default from: "GitLab <#{Gitlab.config.gitlab.email_from}>"
|
||||
default reply_to: Gitlab.config.gitlab.email_reply_to
|
||||
end
|
||||
@@ -2,13 +2,8 @@
|
||||
# four configuration values can also be set straight in your models.
|
||||
Devise.setup do |config|
|
||||
# ==> Mailer Configuration
|
||||
# Configure the e-mail address which will be shown in Devise::Mailer,
|
||||
# note that it will be overwritten if you use your own mailer class with default "from" parameter.
|
||||
config.mailer_sender = "GitLab <#{Gitlab.config.gitlab.email_from}>"
|
||||
|
||||
|
||||
# Configure the class responsible to send e-mails.
|
||||
# config.mailer = "Devise::Mailer"
|
||||
config.mailer = "DeviseMailer"
|
||||
|
||||
# ==> ORM configuration
|
||||
# Load and configure the ORM. Supports :active_record (default) and
|
||||
|
||||
@@ -11,9 +11,8 @@ describe Notify do
|
||||
let(:recipient) { create(:user, email: 'recipient@example.com') }
|
||||
let(:project) { create(:project) }
|
||||
|
||||
around(:each) { ActionMailer::Base.deliveries.clear }
|
||||
|
||||
before(:each) do
|
||||
ActionMailer::Base.deliveries.clear
|
||||
email = recipient.emails.create(email: "notifications@example.com")
|
||||
recipient.update_attribute(:notification_email, email.email)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user