mirror of https://github.com/rails/rails
Use 1.9 syntax.
This commit is contained in:
parent
5ffc36d476
commit
1a8ca9fc35
|
@ -8,16 +8,16 @@ class AssertSelectEmailTest < ActionMailer::TestCase
|
|||
|
||||
class AssertSelectMailer < ActionMailer::Base
|
||||
def test(html)
|
||||
mail :body => html, :content_type => "text/html",
|
||||
:subject => "Test e-mail", :from => "test@test.host", :to => "test <test@test.host>"
|
||||
mail body: html, content_type: "text/html",
|
||||
subject: "Test e-mail", from: "test@test.host", to: "test <test@test.host>"
|
||||
end
|
||||
end
|
||||
|
||||
class AssertMultipartSelectMailer < ActionMailer::Base
|
||||
def test(options)
|
||||
mail :subject => "Test e-mail", :from => "test@test.host", :to => "test <test@test.host>" do |format|
|
||||
format.text { render :text => options[:text] }
|
||||
format.html { render :text => options[:html] }
|
||||
mail subject: "Test e-mail", from: "test@test.host", to: "test <test@test.host>" do |format|
|
||||
format.text { render text: options[:text] }
|
||||
format.html { render text: options[:html] }
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -42,7 +42,7 @@ class AssertSelectEmailTest < ActionMailer::TestCase
|
|||
end
|
||||
|
||||
def test_assert_select_email_multipart
|
||||
AssertMultipartSelectMailer.test(:html => "<div><p>foo</p><p>bar</p></div>", :text => 'foo bar').deliver
|
||||
AssertMultipartSelectMailer.test(html: "<div><p>foo</p><p>bar</p></div>", text: 'foo bar').deliver
|
||||
assert_select_email do
|
||||
assert_select "div:root" do
|
||||
assert_select "p:first-child", "foo"
|
||||
|
|
Loading…
Reference in New Issue