From a488dd50c41cd2022bf8af7e0eb82cc7fd39fc8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonne=20Ha=C3=9F?= Date: Thu, 6 Sep 2012 21:28:39 +0200 Subject: [PATCH] follow up of last commit fixing remaining specs changed spec since it didn't actually test what it said --- spec/mailers/notifier_spec.rb | 4 ++-- spec/models/status_message_spec.rb | 8 +++++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/spec/mailers/notifier_spec.rb b/spec/mailers/notifier_spec.rb index 0e6498e36..a77ad671d 100644 --- a/spec/mailers/notifier_spec.rb +++ b/spec/mailers/notifier_spec.rb @@ -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 diff --git a/spec/models/status_message_spec.rb b/spec/models/status_message_spec.rb index 24a75c6f5..1dfc02d6d 100644 --- a/spec/models/status_message_spec.rb +++ b/spec/models/status_message_spec.rb @@ -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 = "" - @message.to_xml.to_s.should include @message.text + it 'serializes the escaped, unprocessed message' do + text = "[url](http://example.org)" + @message.text = text + @message.to_xml.to_s.should include text.to_xs end + it 'serializes the message' do @xml.should include "I hate WALRUSES!" end