-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add "reply-to" field in user messages #1545
base: develop
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good already. Have some tiny change requests.
@@ -18,7 +18,7 @@ class UserMailerTest < ActiveSupport::TestCase | |||
mail = UserMailer.contact(sender: sender, resource_id: receiver.id, text: text) | |||
|
|||
mail.must deliver_to receiver.email | |||
mail.subject.must_equal('[Fairmondo] ein/e Nutzer*in hat eine Frage an Dich') | |||
mail.subject.must_equal('[Fairmondo] #{sender.nickname} hat eine Frage an Dich') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For interpolation in ruby you need double quotes ""
instead of single quotes ''
that is the reason for the failed CI as well.
@@ -13,7 +13,7 @@ def contact(sender:, resource_id:, text:) | |||
@sender = sender | |||
@receiver = User.find resource_id | |||
@text = text | |||
@subject = I18n.t('email.user.contact.subject') | |||
mail to: @receiver.email, subject: @subject | |||
@subject = I18n.t('email.user.contact.subject', sender_name: @sender.name) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in the tests it is sender.name
, while here we go for sender.nickname
. We should use the same value.
No description provided.