Actualizar plugin Additionals a 3.0.0
This commit is contained in:
parent
3d976f1b3b
commit
a26f5567af
399 changed files with 70374 additions and 4093 deletions
|
@ -105,7 +105,7 @@ module ApiTest
|
|||
assert_difference('Issue.count', -1) do
|
||||
delete '/issues/6.xml', headers: credentials('jsmith')
|
||||
|
||||
assert_response :ok
|
||||
assert_response :success
|
||||
assert_equal '', response.body
|
||||
end
|
||||
assert_nil Issue.find_by(id: 6)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
require File.expand_path('../../test_helper', __FILE__)
|
||||
require File.expand_path '../../test_helper', __FILE__
|
||||
|
||||
class CommonViewsTest < Redmine::IntegrationTest
|
||||
class CommonViewsTest < Additionals::IntegrationTest
|
||||
fixtures :projects,
|
||||
:users,
|
||||
:roles,
|
||||
|
@ -23,15 +23,16 @@ class CommonViewsTest < Redmine::IntegrationTest
|
|||
end
|
||||
|
||||
test 'View user' do
|
||||
log_user('admin', 'admin')
|
||||
log_user 'admin', 'admin'
|
||||
get '/users/2'
|
||||
assert_response :success
|
||||
end
|
||||
|
||||
test 'View issue' do
|
||||
log_user('admin', 'admin')
|
||||
EnabledModule.create(project_id: 1, name: 'issue_tracking')
|
||||
issue = Issue.where(id: 1).first
|
||||
log_user 'admin', 'admin'
|
||||
EnabledModule.create project_id: 1, name: 'issue_tracking'
|
||||
issue = issues :issues_001
|
||||
issue.description = 'new value'
|
||||
issue.save
|
||||
get '/issues/1'
|
||||
assert_response :success
|
||||
|
|
|
@ -1,28 +1,45 @@
|
|||
require File.expand_path('../../test_helper', __FILE__)
|
||||
require File.expand_path '../../test_helper', __FILE__
|
||||
|
||||
class JavascriptLibraryTest < Redmine::IntegrationTest
|
||||
def test_loaded_css_libraries
|
||||
class JavascriptLibraryTest < Additionals::IntegrationTest
|
||||
fixtures :projects,
|
||||
:users,
|
||||
:roles,
|
||||
:members,
|
||||
:member_roles,
|
||||
:trackers,
|
||||
:projects_trackers,
|
||||
:enabled_modules,
|
||||
:issue_statuses,
|
||||
:issues,
|
||||
:enumerations,
|
||||
:custom_fields,
|
||||
:custom_values,
|
||||
:custom_fields_trackers,
|
||||
:dashboards, :dashboard_roles,
|
||||
:queries
|
||||
|
||||
def test_not_loaded_chart_css_library
|
||||
skip if Redmine::Plugin.installed?('redmine_reporting')
|
||||
|
||||
log_user('admin', 'admin')
|
||||
get '/'
|
||||
|
||||
assert_response :success
|
||||
assert_select 'link[rel=stylesheet][href^=?]', '/plugin_assets/additionals/stylesheets/fontawesome-all.min.css'
|
||||
|
||||
return unless Redmine::Plugin.installed?('redmine_reporting')
|
||||
|
||||
assert_select 'link[rel=stylesheet][href^=?]', '/plugin_assets/additionals/stylesheets/nv.d3.min.css', count: 1
|
||||
assert_select 'link[rel=stylesheet][href^=?]', '/plugin_assets/additionals/stylesheets/Chart.min.css', count: 0
|
||||
end
|
||||
|
||||
def test_not_loaded_css_libraries
|
||||
def test_not_loaded_chart_js_library
|
||||
skip if Redmine::Plugin.installed?('redmine_reporting')
|
||||
|
||||
log_user('admin', 'admin')
|
||||
get '/'
|
||||
|
||||
assert_response :success
|
||||
|
||||
return if Redmine::Plugin.installed?('redmine_reporting')
|
||||
|
||||
assert_select 'link[rel=stylesheet][href^=?]', '/plugin_assets/additionals/stylesheets/nv.d3.min.css', count: 0
|
||||
assert_select 'script[src^=?]', '/plugin_assets/additionals/javascripts/Chart.bundle.min.js', count: 0
|
||||
end
|
||||
|
||||
def test_not_loaded_javascript_libraries
|
||||
log_user('admin', 'admin')
|
||||
get '/'
|
||||
|
||||
assert_response :success
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require File.expand_path('../../test_helper', __FILE__)
|
||||
require File.expand_path '../../test_helper', __FILE__
|
||||
|
||||
class RoutingTest < Redmine::RoutingTest
|
||||
def test_issue_assign_to_me
|
||||
|
@ -8,4 +8,30 @@ class RoutingTest < Redmine::RoutingTest
|
|||
def test_issue_change_status
|
||||
should_route 'PUT /issues/1/change_status' => 'additionals_change_status#update', issue_id: '1'
|
||||
end
|
||||
|
||||
def test_help_macro
|
||||
should_route 'GET /help/macros' => 'additionals_macros#show'
|
||||
end
|
||||
|
||||
def test_auto_completes
|
||||
should_route 'GET /auto_completes/fontawesome' => 'auto_completes#fontawesome'
|
||||
should_route 'GET /auto_completes/issue_assignee' => 'auto_completes#issue_assignee'
|
||||
end
|
||||
|
||||
def test_dashboards
|
||||
should_route 'GET /dashboards.xml' => 'dashboards#index', format: 'xml'
|
||||
should_route 'GET /dashboards.json' => 'dashboards#index', format: 'json'
|
||||
|
||||
should_route 'GET /dashboards/1.xml' => 'dashboards#show', id: '1', format: 'xml'
|
||||
should_route 'GET /dashboards/1.json' => 'dashboards#show', id: '1', format: 'json'
|
||||
should_route 'GET /dashboards/1/edit' => 'dashboards#edit', id: '1'
|
||||
|
||||
should_route 'GET /projects/foo/dashboards.xml' => 'dashboards#index', project_id: 'foo', format: 'xml'
|
||||
should_route 'GET /projects/foo/dashboards.json' => 'dashboards#index', project_id: 'foo', format: 'json'
|
||||
end
|
||||
|
||||
def test_dashboard_async_blocks
|
||||
should_route 'GET /dashboard_async_blocks' => 'dashboard_async_blocks#show'
|
||||
should_route 'GET /projects/foo/dashboard_async_blocks' => 'dashboard_async_blocks#show', project_id: 'foo'
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue