Fixed failing tests

- Some fixtures added by Erik Ordway broke tests
- message:// links had an edge case I broke with 68701ada
- One test had a hard-coded id that changed

Closes #1019
This commit is contained in:
Eric Allen 2010-04-09 09:34:57 -04:00
parent 68701adaca
commit a022f449c1
7 changed files with 9 additions and 45 deletions

View file

@ -196,15 +196,15 @@ module ApplicationHelper
# do not change string; URL is alreay linked
href
else
content_tag(:a, h(href), :href => h(href))
content = content_tag(:a, h(href), :href => h(href))
end
end
end
def format_note(note)
note = markdown(note)
note = auto_link_message(note)
note = auto_link(note)
note = markdown(note)
note = auto_link(note, :link => :urls)
# add onenote and message protocols
Sanitize::Config::RELAXED[:protocols]['a']['href'] << 'onenote'

View file

@ -288,7 +288,7 @@ class Todo < ActiveRecord::Base
end
def notes=(value)
super(value.gsub(/</, '&lt;').gsub(/>/, '&gt;'))
super(value.try(:gsub, /</, '&lt;').try(:gsub, />/, '&gt;'))
end
def raw_notes=(value)