Commit d380dc086b79734bc432e3d7d964cdf76e79c48e
1 parent
61e1b12f
Exists in
master
and in
29 other branches
ActionItem337: fixing link + enhancing tests
git-svn-id: https://svn.colivre.coop.br/svn/noosfero/trunk@1711 3f533792-8f58-4932-b0fe-aaf55b0a4547
Showing
2 changed files
with
29 additions
and
10 deletions
Show diff stats
app/views/admin_panel/index.rhtml
1 | -<h1><%= _('Administrator Panel') %></h1> | |
1 | +/<h1><%= _('Administrator Panel') %></h1> | |
2 | 2 | |
3 | 3 | <p><%= _('You, as an environment administrator, has the following options:')%></p> |
4 | 4 | |
5 | 5 | <ul> |
6 | 6 | <li><%= link_to _('Edit site info'), :action => 'site_info' %></li> |
7 | 7 | <li><%= link_to _('Enable/disable features'), :controller => 'features' %></li> |
8 | - <li><%= link_to _('Edit the Visual Design'), :controller => 'edit_template'%></li> | |
8 | + <li><%= link_to _('Edit the Visual Design'), :controller => 'environment_design'%></li> | |
9 | 9 | <li><%= link_to _('Manage Categories'), :controller => 'categories'%></li> |
10 | 10 | <li><%= link_to _('Manage User roles'), :controller => 'role' %></li> |
11 | 11 | <li><%= link_to _('Manage Validators by region'), :controller => 'region_validators' %></li> | ... | ... |
test/functional/admin_panel_controller_test.rb
... | ... | @@ -22,15 +22,34 @@ class AdminPanelControllerTest < Test::Unit::TestCase |
22 | 22 | assert_valid_xhtml |
23 | 23 | end |
24 | 24 | |
25 | - def test_index | |
25 | + should 'link to site_info editing page' do | |
26 | 26 | get :index |
27 | - assert_template 'index' | |
28 | - assert_tag :tag => 'a', :attributes => { :href => /site_info/ } | |
29 | - assert_tag :tag => 'a', :attributes => { :href => /categories/ } | |
30 | - assert_tag :tag => 'a', :attributes => { :href => /edit_template/ } | |
31 | - assert_tag :tag => 'a', :attributes => { :href => /features/ } | |
32 | - assert_tag :tag => 'a', :attributes => { :href => /role/ } | |
33 | - assert_tag :tag => 'a', :attributes => { :href => /region_validators/ } | |
27 | + assert_tag :tag => 'a', :attributes => { :href => '/admin/admin_panel/site_info' } | |
28 | + end | |
29 | + | |
30 | + should 'link to cateogries editing' do | |
31 | + get :index | |
32 | + assert_tag :tag => 'a', :attributes => { :href => '/admin/categories' } | |
33 | + end | |
34 | + | |
35 | + should 'link to design editor' do | |
36 | + get :index | |
37 | + assert_tag :tag => 'a', :attributes => { :href => '/admin/environment_design' } | |
38 | + end | |
39 | + | |
40 | + should 'link to features editing screen' do | |
41 | + get :index | |
42 | + assert_tag :tag => 'a', :attributes => { :href => '/admin/features' } | |
43 | + end | |
44 | + | |
45 | + should 'link to role editing screen' do | |
46 | + get :index | |
47 | + assert_tag :tag => 'a', :attributes => { :href => '/admin/role' } | |
48 | + end | |
49 | + | |
50 | + should 'link to region validator screen' do | |
51 | + get :index | |
52 | + assert_tag :tag => 'a', :attributes => { :href => '/admin/region_validators' } | |
34 | 53 | end |
35 | 54 | |
36 | 55 | should 'display form for editing site info' do | ... | ... |