Adds a css class on menu items in order to apply item specific styles (eg. icons).

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2059 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2008-11-27 18:04:48 +00:00
parent 7a441c1bc4
commit 546b98a118
4 changed files with 32 additions and 17 deletions

View File

@@ -234,14 +234,17 @@ class ProjectsControllerTest < Test::Unit::TestCase
get :show, :id => 1
assert_tag :div, :attributes => { :id => 'main-menu' },
:descendant => { :tag => 'li', :child => { :tag => 'a', :content => 'Foo' } }
:descendant => { :tag => 'li', :child => { :tag => 'a', :content => 'Foo',
:attributes => { :class => 'foo' } } }
assert_tag :div, :attributes => { :id => 'main-menu' },
:descendant => { :tag => 'li', :child => { :tag => 'a', :content => 'Bar' },
:descendant => { :tag => 'li', :child => { :tag => 'a', :content => 'Bar',
:attributes => { :class => 'bar' } },
:before => { :tag => 'li', :child => { :tag => 'a', :content => 'ECOOKBOOK' } } }
assert_tag :div, :attributes => { :id => 'main-menu' },
:descendant => { :tag => 'li', :child => { :tag => 'a', :content => 'ECOOKBOOK' },
:descendant => { :tag => 'li', :child => { :tag => 'a', :content => 'ECOOKBOOK',
:attributes => { :class => 'hello' } },
:before => { :tag => 'li', :child => { :tag => 'a', :content => 'Activity' } } }
# Remove the menu items