Extract rendering to helper method. Shift filename sanitization to controller.

This commit is contained in:
Jan-Yves Ruzicka 2015-04-03 12:13:21 +01:00
parent 7801364662
commit ccf13418f4
12 changed files with 105 additions and 78 deletions

View file

@ -532,14 +532,12 @@ class TodoTest < ActiveSupport::TestCase
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
def test_attachments_are_removed_after_delete