profile_controller_test.rb
754 Bytes
require File.dirname(__FILE__) + '/../test_helper'
require 'profile_controller'
# Re-raise errors caught by the controller.
class ProfileController; def rescue_action(e) raise e end; end
class ProfileControllerTest < Test::Unit::TestCase
def setup
@controller = ProfileController.new
@request = ActionController::TestRequest.new
@response = ActionController::TestResponse.new
@profile = create_user('testuser').person
end
noosfero_test :profile => 'testuser'
should 'list friends' do
get :friends
assert_response :success
assert_template 'friends'
assert_kind_of Array, assigns(:friends)
end
should 'list communities'
should 'list environments'
should 'list members (for organizations)'
end