Commit 1af11191ddb2da6ea93ea86ce7fbbb9a089feaf7
1 parent
43b317df
Exists in
web_steps_improvements
and in
9 other branches
Revert "remove unit test causing colateral errors"
This reverts commit 23bd8bbc2293d5123bbcb4b416143934edf23abc. I found a way to fix the problem using `alias_method`
Showing
1 changed file
with
22 additions
and
0 deletions
Show diff stats
test/unit/profile_list_block_test.rb
| @@ -22,6 +22,28 @@ class ProfileListBlockTest < ActiveSupport::TestCase | @@ -22,6 +22,28 @@ class ProfileListBlockTest < ActiveSupport::TestCase | ||
| 22 | 22 | ||
| 23 | include BoxesHelper | 23 | include BoxesHelper |
| 24 | 24 | ||
| 25 | + should 'list people' do | ||
| 26 | + env = fast_create(Environment) | ||
| 27 | + | ||
| 28 | + person1 = create_user('testperson1', :environment => env).person | ||
| 29 | + person2 = create_user('testperson2', :environment => env).person | ||
| 30 | + person3 = create_user('testperson3', :environment => env).person | ||
| 31 | + | ||
| 32 | + block = ProfileListBlock.new | ||
| 33 | + block.stubs(:owner).returns(env) | ||
| 34 | + | ||
| 35 | + ApplicationHelper.class_eval do | ||
| 36 | + def profile_image_link( profile, size=:portrait, tag='li', extra_info = nil ) | ||
| 37 | + "<#{profile.name}>" | ||
| 38 | + end | ||
| 39 | + end | ||
| 40 | + | ||
| 41 | + content = render_block_content(block) | ||
| 42 | + assert_match '<testperson1>', content | ||
| 43 | + assert_match '<testperson2>', content | ||
| 44 | + assert_match '<testperson3>', content | ||
| 45 | + end | ||
| 46 | + | ||
| 25 | should 'list private profiles' do | 47 | should 'list private profiles' do |
| 26 | env = fast_create(Environment) | 48 | env = fast_create(Environment) |
| 27 | env.boxes << Box.new | 49 | env.boxes << Box.new |
-
mentioned in commit 99f5d74cc1ae8aab54d53d9c58ec2475959e6e5e