mirror of
https://github.com/internetee/registry.git
synced 2025-06-07 21:25:39 +02:00
Remove hardcoded default email sender
And make it configurable via `action_mailer_default_from` config. Closes #243
This commit is contained in:
parent
6a61d7de5b
commit
a113d75ec5
5 changed files with 21 additions and 1 deletions
17
test/mailers/application_mailer_test.rb
Normal file
17
test/mailers/application_mailer_test.rb
Normal file
|
@ -0,0 +1,17 @@
|
|||
require 'test_helper'
|
||||
|
||||
class ApplicationMailerTest < ActiveSupport::TestCase
|
||||
def test_reads_default_from_setting_from_config
|
||||
assert_equal 'no-reply@registry.test', ENV['action_mailer_default_from']
|
||||
|
||||
mailer = Class.new(ApplicationMailer) do
|
||||
def test
|
||||
# Empty block to avoid template rendering
|
||||
mail {}
|
||||
end
|
||||
end
|
||||
email = mailer.test
|
||||
|
||||
assert_equal ['no-reply@registry.test'], email.from
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue