Commit 5e746850fa7a300f18cae8d7936952e2ba071f4c
1 parent
87648bee
Exists in
master
and in
29 other branches
ActionItem135: accepting empty body for TextileArticle
git-svn-id: https://svn.colivre.coop.br/svn/noosfero/trunk@1162 3f533792-8f58-4932-b0fe-aaf55b0a4547
Showing
2 changed files
with
9 additions
and
1 deletions
Show diff stats
app/models/textile_article.rb
test/unit/textile_article_test.rb
... | ... | @@ -23,4 +23,12 @@ class TextileArticleTest < Test::Unit::TestCase |
23 | 23 | assert_equal '<p><strong>my text</strong></p>', TextileArticle.new(:body => '*my text*').to_html |
24 | 24 | end |
25 | 25 | |
26 | + should 'accept empty body' do | |
27 | + a = TextileArticle.new | |
28 | + a.expects(:body).returns(nil) | |
29 | + assert_nothing_raised do | |
30 | + assert_equal '', a.to_html | |
31 | + end | |
32 | + end | |
33 | + | |
26 | 34 | end | ... | ... |