Commit 88224fbf3a2026deb6617f9c4f74b78efba644d2

Authored by DanielaFeitosa
1 parent 3acac847

ActionItem6: enterprise controller test


git-svn-id: https://svn.colivre.coop.br/svn/noosfero/trunk@216 3f533792-8f58-4932-b0fe-aaf55b0a4547
Showing 1 changed file with 12 additions and 3 deletions   Show diff stats
test/functional/enterprise_controller_test.rb
... ... @@ -5,14 +5,23 @@ require 'enterprise_controller'
5 5 class EnterpriseController; def rescue_action(e) raise e end; end
6 6  
7 7 class EnterpriseControllerTest < Test::Unit::TestCase
  8 + fixtures :users
  9 +
8 10 def setup
9 11 @controller = EnterpriseController.new
10 12 @request = ActionController::TestRequest.new
11 13 @response = ActionController::TestResponse.new
  14 + login_as('ze')
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_response :success
  20 +
  21 + assert_kind_of Array, assigns(:my_enterprises)
  22 +
  23 + assert_kind_of Array, assigns(:pending_enterprises)
17 24 end
  25 +
  26 +
18 27 end
... ...