Get all non-cucumber tests passing

This commit is contained in:
Reinier Balt 2012-04-12 12:47:25 +02:00
parent bb8b5a4c72
commit 12d8915eda
7 changed files with 30 additions and 22 deletions

View file

@ -386,4 +386,19 @@ class TodoTest < ActiveSupport::TestCase
assert !recent_created_todos.include?(todo_old)
end
def test_notes_are_rendered_on_save
user = @completed.user
todo = user.todos.create(:description => "test", :context => @completed.context)
assert_nil todo.notes
assert_nil todo.rendered_notes
todo.notes = "*test*"
todo.save!
todo.reload
assert_equal "*test*", todo.notes
assert_equal "<p><strong>test</strong></p>", todo.rendered_notes
end
end