Commit b74b1e3275a25fc3ff5179ddb8b08d55c91509ed
1 parent
f01fa9bc
Exists in
master
and in
28 other branches
ActionItem139: adding new implementation of "profile info" block
git-svn-id: https://svn.colivre.coop.br/svn/noosfero/trunk@1310 3f533792-8f58-4932-b0fe-aaf55b0a4547
Showing
3 changed files
with
45 additions
and
0 deletions
Show diff stats
| @@ -0,0 +1,24 @@ | @@ -0,0 +1,24 @@ | ||
| 1 | +require File.dirname(__FILE__) + '/../test_helper' | ||
| 2 | + | ||
| 3 | +class ProfileInfoBlockTest < Test::Unit::TestCase | ||
| 4 | + | ||
| 5 | + def setup | ||
| 6 | + @profile = create_user('mytestuser').person | ||
| 7 | + | ||
| 8 | + @block = ProfileInfoBlock.new | ||
| 9 | + @profile.boxes.first.blocks << @block | ||
| 10 | + | ||
| 11 | + @block.save! | ||
| 12 | + end | ||
| 13 | + attr_reader :block, :profile | ||
| 14 | + | ||
| 15 | + should 'provide description' do | ||
| 16 | + assert_not_equal Block.description, ProfileInfoBlock.description | ||
| 17 | + end | ||
| 18 | + | ||
| 19 | + should 'display profile information' do | ||
| 20 | + self.expects(:render).with(:file => 'blocks/profile_info', :locals => { :block => block}) | ||
| 21 | + instance_eval(& block.content) | ||
| 22 | + end | ||
| 23 | + | ||
| 24 | +end |