Nuevo plugin Additionals 2.0.20
This commit is contained in:
parent
a2a901b71b
commit
93e1e28683
354 changed files with 40514 additions and 0 deletions
43
plugins/additionals/test/functional/projects_controller_test.rb
Executable file
43
plugins/additionals/test/functional/projects_controller_test.rb
Executable file
|
@ -0,0 +1,43 @@
|
|||
require File.expand_path('../../test_helper', __FILE__)
|
||||
|
||||
class ProjectsControllerTest < Additionals::ControllerTest
|
||||
fixtures :projects,
|
||||
:users,
|
||||
:roles,
|
||||
:members,
|
||||
:member_roles,
|
||||
:issues,
|
||||
:issue_statuses,
|
||||
:versions,
|
||||
:trackers,
|
||||
:projects_trackers,
|
||||
:issue_categories,
|
||||
:enabled_modules
|
||||
|
||||
def setup
|
||||
Setting.default_language = 'en'
|
||||
User.current = nil
|
||||
end
|
||||
|
||||
def test_show_overview_content
|
||||
with_additionals_settings(project_overview_content: 'Lore impsuum') do
|
||||
@request.session[:user_id] = 4
|
||||
get :show,
|
||||
params: { id: 1 }
|
||||
|
||||
assert_response :success
|
||||
assert_select 'div.project-content', text: /Lore impsuum/
|
||||
end
|
||||
end
|
||||
|
||||
def test_do_not_show_overview_content_box
|
||||
with_additionals_settings(project_overview_content: '') do
|
||||
@request.session[:user_id] = 4
|
||||
get :show,
|
||||
params: { id: 1 }
|
||||
|
||||
assert_response :success
|
||||
assert_select 'div.project-content', count: 0
|
||||
end
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue