Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Changeset 4903

Show
Ignore:
Timestamp:
09/02/06 19:35:55 (2 years ago)
Author:
david
Message:

Added test for custom headers on parts (closes #3043)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/actionmailer/test/mail_service_test.rb

    r4523 r4903  
    215215    from         "test@example.com" 
    216216    content_type "multipart/mixed" 
    217     part :content_type => "multipart/alternative", :content_disposition => "inline" do |p| 
     217    part :content_type => "multipart/alternative", :content_disposition => "inline", :headers => { "foo" => "bar" } do |p| 
    218218      p.part :content_type => "text/plain", :body => "test text\nline #2" 
    219219      p.part :content_type => "text/html", :body => "<b>test</b> HTML<br/>\nline #2" 
     
    297297    assert_equal "multipart/mixed", created.content_type 
    298298    assert_equal "multipart/alternative", created.parts.first.content_type 
     299    assert_equal "bar", created.parts.first.header['foo'].to_s 
    299300    assert_equal "text/plain", created.parts.first.parts.first.content_type 
    300301    assert_equal "text/html", created.parts.first.parts[1].content_type