Commit 5f0f6ea5888d57db847f8dedd2c7addb5ee20f10

Authored by JoenioCosta
1 parent fafc7edd

ActionItem501: oops: products block without description

git-svn-id: https://svn.colivre.coop.br/svn/noosfero/trunk@2198 3f533792-8f58-4932-b0fe-aaf55b0a4547
app/models/products_block.rb
... ... @@ -4,6 +4,10 @@ class ProductsBlock < Block
4 4 include ActionView::Helpers::UrlHelper
5 5 include ActionController::UrlWriter
6 6  
  7 + def self.description
  8 + _('A block that displays products')
  9 + end
  10 +
7 11 def default_title
8 12 _('Products')
9 13 end
... ...
test/unit/products_block_test.rb
... ... @@ -15,6 +15,10 @@ class ProductsBlockTest < ActiveSupport::TestCase
15 15 assert_not_equal Block.new.default_title, ProductsBlock.new.default_title
16 16 end
17 17  
  18 + should 'provide default description' do
  19 + assert_not_equal Block.description, ProductsBlock.description
  20 + end
  21 +
18 22 should "list owner products" do
19 23  
20 24 enterprise = Enterprise.create!(:name => 'testenterprise', :identifier => 'testenterprise')
... ...