aboutsummaryrefslogtreecommitdiffstats
path: root/spec/lib/mail_handler/mail_handler_spec.rb
blob: fa29132bced051c8c33d156684dfced6af91c390 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# coding: utf-8
require File.expand_path(File.dirname(__FILE__) + '../../../spec_helper')

def get_fixture_mail(filename)
    MailHandler.mail_from_raw_email(load_file_fixture(filename))
end

describe 'when creating a mail object from raw data' do

    it 'should correctly parse a multipart email with a linebreak in the boundary' do
        mail = get_fixture_mail('space-boundary.email')
        mail.parts.size.should == 2
        mail.multipart?.should == true
    end

end