Commit beb5c42b3f205246db6df86879641b78448e5234
1 parent
b4ca3878
Exists in
web_steps_improvements
and in
9 other branches
Fix ProfileImageBlock unit tests
After removing the content method it is now necessary to use BoxesHelper#render_block_content.
Showing
1 changed file
with
4 additions
and
2 deletions
Show diff stats
test/unit/profile_image_block_test.rb
1 | require_relative "../test_helper" | 1 | require_relative "../test_helper" |
2 | +require 'boxes_helper' | ||
2 | 3 | ||
3 | class ProfileImageBlockTest < ActiveSupport::TestCase | 4 | class ProfileImageBlockTest < ActiveSupport::TestCase |
5 | + include BoxesHelper | ||
4 | 6 | ||
5 | should 'provide description' do | 7 | should 'provide description' do |
6 | assert_not_equal Block.description, ProfileImageBlock.description | 8 | assert_not_equal Block.description, ProfileImageBlock.description |
@@ -9,8 +11,8 @@ class ProfileImageBlockTest < ActiveSupport::TestCase | @@ -9,8 +11,8 @@ class ProfileImageBlockTest < ActiveSupport::TestCase | ||
9 | should 'display profile image' do | 11 | should 'display profile image' do |
10 | block = ProfileImageBlock.new | 12 | block = ProfileImageBlock.new |
11 | 13 | ||
12 | - self.expects(:render).with(:file => 'blocks/profile_image', :locals => { :block => block, :show_name => false}) | ||
13 | - instance_eval(& block.content) | 14 | + self.expects(:render).with(:file => 'blocks/profile_image', :locals => { :block => block }) |
15 | + render_block_content(block) | ||
14 | end | 16 | end |
15 | 17 | ||
16 | should 'be editable' do | 18 | should 'be editable' do |