require File.expand_path('../../test_helper', __FILE__) class UsersControllerTest < ActionController::TestCase fixtures :users, :projects, :members, :member_roles, :roles, :custom_fields, :custom_values, :groups_users, :auth_sources, :activities, :journals_for_messages def setup User.current = nil @request.session[:user_id] = 1 @request.session[:ctime] = Time.now @request.session[:atime] = Time.now end test '#index by non-member' do @request.session[:user_id] = nil get :index assert_response :success assert_template 'index' end test '#show by non-member' do @request.session[:user_id] = 8 get :show, {id: 5} assert_response :success assert_template 'show' end test '#user_newfeedback by non-member' do @request.session[:user_id] = nil get :user_newfeedback, {id: 5} assert_response :success assert_template 'user_newfeedback' end end