1 require File.dirname(__FILE__) + '/../test_helper'
2 require 'admin_controller'
4 # Re-raise errors caught by the controller.
5 class AdminController; def rescue_action(e) raise e end; end
7 class AdminCategoryTest < Test::Unit::TestCase
8 fixtures :settings, :groups, :users, :forums, :categories
10 @controller = AdminController.new
11 @request = ActionController::TestRequest.new
12 @response = ActionController::TestResponse.new
13 User.current_user = users(:admin)
22 assert_form :action => 'update_options'
25 def test_update_options
26 get :update_options, :form => {:board_title => 'board title'}
27 assert_response :success
28 assert_nil flash[:error]
33 assert_form :action => 'update_permissions'
36 def test_update_permissions
37 get :update_permissions, :form => {:message_bbcode => '1'}
38 assert_response :success
39 assert_nil flash[:error]
44 assert_form :action => :find_user
49 assert assigns(:users)
54 assert assigns(:max_posted)
55 assert assigns(:count_posts)
60 assert assigns(:forums)
65 assert assigns(:posts)