Commit ddc0af1125942de2d425e6833cddee40f0f37673
1 parent
932d74f8
Exists in
master
and in
29 other branches
Fixing unit test broken by commit 'c1fc02'
Showing
2 changed files
with
7 additions
and
14 deletions
Show diff stats
test/test_helper.rb
@@ -209,6 +209,10 @@ module NoosferoTestHelper | @@ -209,6 +209,10 @@ module NoosferoTestHelper | ||
209 | def options_for_select(collection) | 209 | def options_for_select(collection) |
210 | collection.map{|item| "<option value='#{item[1]}'>#{item[0]}</option>"}.join("\n") | 210 | collection.map{|item| "<option value='#{item[1]}'>#{item[0]}</option>"}.join("\n") |
211 | end | 211 | end |
212 | + | ||
213 | + def params | ||
214 | + {} | ||
215 | + end | ||
212 | end | 216 | end |
213 | 217 | ||
214 | class ActionController::IntegrationTest | 218 | class ActionController::IntegrationTest |
test/unit/article_block_test.rb
@@ -89,7 +89,7 @@ class ArticleBlockTest < Test::Unit::TestCase | @@ -89,7 +89,7 @@ class ArticleBlockTest < Test::Unit::TestCase | ||
89 | block.expects(:title).returns('') | 89 | block.expects(:title).returns('') |
90 | block.stubs(:article).returns(article) | 90 | block.stubs(:article).returns(article) |
91 | 91 | ||
92 | - assert_equal "<h3></h3>Article content", instance_eval(&block.content) | 92 | + assert_equal "<h3><span></span></h3>Article content", instance_eval(&block.content) |
93 | end | 93 | end |
94 | 94 | ||
95 | should "display title if defined" do | 95 | should "display title if defined" do |
@@ -99,7 +99,7 @@ class ArticleBlockTest < Test::Unit::TestCase | @@ -99,7 +99,7 @@ class ArticleBlockTest < Test::Unit::TestCase | ||
99 | block.expects(:title).returns('Article title') | 99 | block.expects(:title).returns('Article title') |
100 | block.stubs(:article).returns(article) | 100 | block.stubs(:article).returns(article) |
101 | 101 | ||
102 | - assert_equal "<h3>Article title</h3>Article content", instance_eval(&block.content) | 102 | + assert_equal "<h3><span>Article title</span></h3>Article content", instance_eval(&block.content) |
103 | end | 103 | end |
104 | 104 | ||
105 | should 'display image if article is an image' do | 105 | should 'display image if article is an image' do |
@@ -142,17 +142,6 @@ class ArticleBlockTest < Test::Unit::TestCase | @@ -142,17 +142,6 @@ class ArticleBlockTest < Test::Unit::TestCase | ||
142 | end | 142 | end |
143 | 143 | ||
144 | protected | 144 | protected |
145 | + include NoosferoTestHelper | ||
145 | 146 | ||
146 | - def content_tag(tag, text, options = {}) | ||
147 | - "<#{tag}>#{text}</#{tag}>" | ||
148 | - end | ||
149 | - def image_tag(arg) | ||
150 | - arg | ||
151 | - end | ||
152 | - def link_to(text, url, options = {}) | ||
153 | - "<a href='#{url.to_s}'>#{text}</a>" | ||
154 | - end | ||
155 | - def params | ||
156 | - {} | ||
157 | - end | ||
158 | end | 147 | end |