Commit ddc33f23f12f5b001d221f87b33f6e8b32055537
1 parent
80a2fa90
Exists in
master
and in
29 other branches
ActionItem243: fixed regretion in display wrong links in the categories menu
git-svn-id: https://svn.colivre.coop.br/svn/noosfero/trunk@1599 3f533792-8f58-4932-b0fe-aaf55b0a4547
Showing
2 changed files
with
17 additions
and
1 deletions
Show diff stats
app/views/shared/categories_menu.rhtml
@@ -5,7 +5,7 @@ | @@ -5,7 +5,7 @@ | ||
5 | <%= item.name %> | 5 | <%= item.name %> |
6 | <ul> | 6 | <ul> |
7 | <% item.children.each do |child| %> | 7 | <% item.children.each do |child| %> |
8 | - <li><%= link_to(content_tag('span', child.name), :controller => 'category', :action => 'view', :path => child.explode_path) %></li> | 8 | + <li><%= link_to(content_tag('span', child.name), :controller => 'category', :action => 'view', :category_path => child.explode_path) %></li> |
9 | <% end %> | 9 | <% end %> |
10 | </ul> | 10 | </ul> |
11 | </li> | 11 | </li> |
@@ -0,0 +1,16 @@ | @@ -0,0 +1,16 @@ | ||
1 | +require "#{File.dirname(__FILE__)}/../test_helper" | ||
2 | + | ||
3 | +class CategoriesMenuTest < ActionController::IntegrationTest | ||
4 | + | ||
5 | + should 'display link to categories' do | ||
6 | + Category.delete_all | ||
7 | + cat1 = Category.create!(:name => 'Food', :environment => Environment.default, :display_color => 1) | ||
8 | + cat2 = Category.create!(:name => 'Vegetables', :environment => Environment.default, :parent => cat1) | ||
9 | + | ||
10 | + get '/' | ||
11 | + | ||
12 | + assert_tag :tag => 'a', :attributes => { :href => '/cat/food/vegetables' } | ||
13 | + | ||
14 | + end | ||
15 | + | ||
16 | +end |