Commit 1f128345b36bf346c201fa4d8539dd17682d08b8
1 parent
8004c697
Exists in
master
and in
28 other branches
r221@sede: terceiro | 2007-07-28 14:40:22 -0300
ActionItem5: adding a small test for admin_panel controller git-svn-id: https://svn.colivre.coop.br/svn/noosfero/trunk@225 3f533792-8f58-4932-b0fe-aaf55b0a4547
Showing
1 changed file
with
9 additions
and
3 deletions
Show diff stats
test/functional/admin_panel_controller_test.rb
... | ... | @@ -5,14 +5,20 @@ require 'admin_panel_controller' |
5 | 5 | class AdminPanelController; def rescue_action(e) raise e end; end |
6 | 6 | |
7 | 7 | class AdminPanelControllerTest < Test::Unit::TestCase |
8 | + | |
9 | + fixtures :virtual_communities | |
10 | + | |
8 | 11 | def setup |
9 | 12 | @controller = AdminPanelController.new |
10 | 13 | @request = ActionController::TestRequest.new |
11 | 14 | @response = ActionController::TestResponse.new |
12 | 15 | end |
13 | 16 | |
14 | - # Replace this with your real tests. | |
15 | - def test_truth | |
16 | - assert true | |
17 | + def test_index | |
18 | + get :index | |
19 | + assert_template 'index' | |
20 | + assert_tag :tag => 'a', :attributes => { :href => /manage_tags/ } | |
21 | + assert_tag :tag => 'a', :attributes => { :href => /edit_template/ } | |
22 | + assert_tag :tag => 'a', :attributes => { :href => /features/ } | |
17 | 23 | end |
18 | 24 | end | ... | ... |