Commit 5f0f6ea5888d57db847f8dedd2c7addb5ee20f10
1 parent
fafc7edd
Exists in
master
and in
29 other branches
ActionItem501: oops: products block without description
git-svn-id: https://svn.colivre.coop.br/svn/noosfero/trunk@2198 3f533792-8f58-4932-b0fe-aaf55b0a4547
Showing
2 changed files
with
8 additions
and
0 deletions
Show diff stats
app/models/products_block.rb
@@ -4,6 +4,10 @@ class ProductsBlock < Block | @@ -4,6 +4,10 @@ class ProductsBlock < Block | ||
4 | include ActionView::Helpers::UrlHelper | 4 | include ActionView::Helpers::UrlHelper |
5 | include ActionController::UrlWriter | 5 | include ActionController::UrlWriter |
6 | 6 | ||
7 | + def self.description | ||
8 | + _('A block that displays products') | ||
9 | + end | ||
10 | + | ||
7 | def default_title | 11 | def default_title |
8 | _('Products') | 12 | _('Products') |
9 | end | 13 | end |
test/unit/products_block_test.rb
@@ -15,6 +15,10 @@ class ProductsBlockTest < ActiveSupport::TestCase | @@ -15,6 +15,10 @@ class ProductsBlockTest < ActiveSupport::TestCase | ||
15 | assert_not_equal Block.new.default_title, ProductsBlock.new.default_title | 15 | assert_not_equal Block.new.default_title, ProductsBlock.new.default_title |
16 | end | 16 | end |
17 | 17 | ||
18 | + should 'provide default description' do | ||
19 | + assert_not_equal Block.description, ProductsBlock.description | ||
20 | + end | ||
21 | + | ||
18 | should "list owner products" do | 22 | should "list owner products" do |
19 | 23 | ||
20 | enterprise = Enterprise.create!(:name => 'testenterprise', :identifier => 'testenterprise') | 24 | enterprise = Enterprise.create!(:name => 'testenterprise', :identifier => 'testenterprise') |