blob: 14acf6ca0e0e2ca9d610fa667926916b8b247e2f (
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
|
require File.dirname(__FILE__) + '/../spec_helper'
describe OutgoingMessage, " when making an outgoing message" do
before do
@outgoing_message = OutgoingMessage.new({
:status => 'ready',
:message_type => 'initial_request',
:body => 'This request contains a foo@bar.com email address',
:last_sent_at => Time.now(),
:what_doing => 'normal_sort'
})
end
it "should not index the email addresses" do
# also used for track emails
@outgoing_message.get_text_for_indexing.should_not include("foo@bar.com")
end
it "should not display email addresses on page" do
@outgoing_message.get_body_for_html_display.should_not include("foo@bar.com")
end
it "should include email addresses in outgoing messages" do
@outgoing_message.body.should include("foo@bar.com")
end
end
|