blob: 77c57c38bab4617f788898d06902cbe32ecb9657 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
describe AdminRawEmailController do
describe :show do
before do
@raw_email = FactoryGirl.create(:incoming_message).raw_email
end
describe 'html version' do
it 'renders the show template' do
get :show, :id => @raw_email.id
end
end
describe 'text version' do
it 'sends the email as an RFC-822 attachment' do
get :show, :id => @raw_email.id, :format => 'txt'
response.content_type.should == 'message/rfc822'
response.body.should == @raw_email.data
end
end
end
end
|