[phase-18]Make fuctional test for GlsosaryCategoriesController index action
This commit is contained in:
parent
7812879965
commit
8e856ce4a4
@ -1,8 +1,17 @@
|
|||||||
require File.expand_path('../../test_helper', __FILE__)
|
require File.expand_path('../../test_helper', __FILE__)
|
||||||
|
|
||||||
class GlossaryCategoriesControllerTest < ActionController::TestCase
|
class GlossaryCategoriesControllerTest < ActionController::TestCase
|
||||||
# Replace this with your real tests.
|
fixtures :projects, :users, :roles, :members, :member_roles
|
||||||
def test_truth
|
|
||||||
assert true
|
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
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user