follow up of last commit fixing remaining specs
changed spec since it didn't actually test what it said
This commit is contained in:
parent
81442f0f2a
commit
a488dd50c4
2 changed files with 7 additions and 5 deletions
|
|
@ -229,7 +229,7 @@ describe Notifier do
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'SUBJECT: has a snippet of the post contents' do
|
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
|
end
|
||||||
|
|
||||||
context 'BODY' do
|
context 'BODY' do
|
||||||
|
|
@ -270,7 +270,7 @@ describe Notifier do
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'SUBJECT: has a snippet of the post contents' do
|
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
|
end
|
||||||
|
|
||||||
context 'BODY' do
|
context 'BODY' do
|
||||||
|
|
|
||||||
|
|
@ -280,10 +280,12 @@ STR
|
||||||
@message = Factory(:status_message, :text => "I hate WALRUSES!", :author => @user.person)
|
@message = Factory(:status_message, :text => "I hate WALRUSES!", :author => @user.person)
|
||||||
@xml = @message.to_xml.to_s
|
@xml = @message.to_xml.to_s
|
||||||
end
|
end
|
||||||
it 'serializes the unescaped, unprocessed message' do
|
it 'serializes the escaped, unprocessed message' do
|
||||||
@message.text = "<script> alert('xss should be federated');</script>"
|
text = "[url](http://example.org)<script> alert('xss should be federated');</script>"
|
||||||
@message.to_xml.to_s.should include @message.text
|
@message.text = text
|
||||||
|
@message.to_xml.to_s.should include text.to_xs
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'serializes the message' do
|
it 'serializes the message' do
|
||||||
@xml.should include "<raw_message>I hate WALRUSES!</raw_message>"
|
@xml.should include "<raw_message>I hate WALRUSES!</raw_message>"
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue