profile_info_block_test.rb
670 Bytes
require File.dirname(__FILE__) + '/../test_helper'
class ProfileInfoBlockTest < Test::Unit::TestCase
def setup
@profile = create_user('mytestuser').person
@block = ProfileInfoBlock.new
@profile.boxes.first.blocks << @block
@block.save!
end
attr_reader :block, :profile
should 'provide description' do
assert_not_equal Block.description, ProfileInfoBlock.description
end
should 'display profile information' do
self.expects(:render).with(:file => 'blocks/profile_info', :locals => { :block => block})
instance_eval(& block.content)
end
should 'not be editable' do
assert !ProfileInfoBlock.new.editable?
end
end