[phase-18]Make fuctional test for GlsosaryCategoriesController index action

This commit is contained in:
Toru Takahashi 2018-08-09 21:27:56 +09:00 committed by TAKAHASHI,Toru
parent 7812879965
commit 8e856ce4a4

View File

@ -1,8 +1,17 @@
require File.expand_path('../../test_helper', __FILE__)
class GlossaryCategoriesControllerTest < ActionController::TestCase
# Replace this with your real tests.
def test_truth
assert true
fixtures :projects, :users, :roles, :members, :member_roles
def setup
@project = projects('projects_001')
@project.enabled_module_names = [:glossary]
roles('roles_001').add_permission! :view_glossary, :manage_glossary
end
def test_index
@request.session[:user_id] = users('users_002').id
get :index, params: {project_id: 1}
assert_response :success
end
end