Commit 20a82cdb7c78c8c3857a5fcddbf2cf01d7694133
1 parent
68e1c77a
Exists in
web_steps_improvements
and in
9 other branches
Fix FeaturedProductsBlock unit tests
After removing the content method it is now necessary to use BoxesHelper#render_block_content.
Showing
1 changed file
with
3 additions
and
1 deletions
Show diff stats
test/unit/featured_products_block_test.rb
1 | require_relative "../test_helper" | 1 | require_relative "../test_helper" |
2 | +require 'boxes_helper' | ||
2 | 3 | ||
3 | class FeaturedProductsBlockTest < ActiveSupport::TestCase | 4 | class FeaturedProductsBlockTest < ActiveSupport::TestCase |
5 | + include BoxesHelper | ||
4 | 6 | ||
5 | def setup | 7 | def setup |
6 | @profile = fast_create(Profile) | 8 | @profile = fast_create(Profile) |
@@ -108,7 +110,7 @@ class FeaturedProductsBlockTest < ActiveSupport::TestCase | @@ -108,7 +110,7 @@ class FeaturedProductsBlockTest < ActiveSupport::TestCase | ||
108 | block = FeaturedProductsBlock.new | 110 | block = FeaturedProductsBlock.new |
109 | 111 | ||
110 | self.expects(:render).with(:file => 'blocks/featured_products', :locals => { :block => block}) | 112 | self.expects(:render).with(:file => 'blocks/featured_products', :locals => { :block => block}) |
111 | - instance_eval(& block.content) | 113 | + render_block_content(block) |
112 | end | 114 | end |
113 | 115 | ||
114 | should "return just highlighted products with image for selection" do | 116 | should "return just highlighted products with image for selection" do |