From 88224fbf3a2026deb6617f9c4f74b78efba644d2 Mon Sep 17 00:00:00 2001 From: DanielaFeitosa Date: Mon, 30 Jul 2007 20:20:38 +0000 Subject: [PATCH] ActionItem6: enterprise controller test --- test/functional/enterprise_controller_test.rb | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/test/functional/enterprise_controller_test.rb b/test/functional/enterprise_controller_test.rb index 44aaece..d7a3116 100644 --- a/test/functional/enterprise_controller_test.rb +++ b/test/functional/enterprise_controller_test.rb @@ -5,14 +5,23 @@ require 'enterprise_controller' class EnterpriseController; def rescue_action(e) raise e end; end class EnterpriseControllerTest < Test::Unit::TestCase + fixtures :users + def setup @controller = EnterpriseController.new @request = ActionController::TestRequest.new @response = ActionController::TestResponse.new + login_as('ze') end - # Replace this with your real tests. - def test_truth - assert true + def test_index + get :index + assert_response :success + + assert_kind_of Array, assigns(:my_enterprises) + + assert_kind_of Array, assigns(:pending_enterprises) end + + end -- libgit2 0.21.2