follow up of last commit fixing remaining specs

changed spec since it didn't actually test what it said
This commit is contained in:
Jonne Haß 2012-09-06 21:28:39 +02:00
parent 81442f0f2a
commit a488dd50c4
2 changed files with 7 additions and 5 deletions

View file

@ -229,7 +229,7 @@ describe Notifier do
end
it 'SUBJECT: has a snippet of the post contents' do
comment_mail.subject.should == "Re: #{truncate(commented_post.text, :length => 70)}"
comment_mail.subject.should == "Re: #{truncate(commented_post.raw_message, :length => 70)}"
end
context 'BODY' do
@ -270,7 +270,7 @@ describe Notifier do
end
it 'SUBJECT: has a snippet of the post contents' do
comment_mail.subject.should == "Re: #{truncate(commented_post.text, :length => 70)}"
comment_mail.subject.should == "Re: #{truncate(commented_post.raw_message, :length => 70)}"
end
context 'BODY' do

View file

@ -280,10 +280,12 @@ STR
@message = Factory(:status_message, :text => "I hate WALRUSES!", :author => @user.person)
@xml = @message.to_xml.to_s
end
it 'serializes the unescaped, unprocessed message' do
@message.text = "<script> alert('xss should be federated');</script>"
@message.to_xml.to_s.should include @message.text
it 'serializes the escaped, unprocessed message' do
text = "[url](http://example.org)<script> alert('xss should be federated');</script>"
@message.text = text
@message.to_xml.to_s.should include text.to_xs
end
it 'serializes the message' do
@xml.should include "<raw_message>I hate WALRUSES!</raw_message>"
end