additionals/test/functional/dashboard_async_blocks_controller_test.rb

37 lines
1019 B
Ruby
Raw Normal View History

2020-08-08 18:53:49 +03:00
require File.expand_path '../../test_helper', __FILE__
2020-07-27 11:49:23 +03:00
class DashboardAsyncBlocksControllerTest < Additionals::ControllerTest
fixtures :projects,
:users,
:roles,
:members,
:member_roles,
:issues,
:issue_statuses,
:versions,
:trackers,
:projects_trackers,
:issue_categories,
:enabled_modules,
:dashboards, :dashboard_roles,
:queries
include Redmine::I18n
def setup
prepare_tests
Setting.default_language = 'en'
@project = projects(:projects_001)
@welcome_dashboard = dashboards :system_default_welcome
@project_dashboard = dashboards :system_default_project
end
def test_query_blocks
assert_dashboard_query_blocks [
{ dashboard_id: @welcome_dashboard.id, block: 'issuequery', entities_class: 'issues' },
{ dashboard_id: @project_dashboard.id, block: 'issuequery', project: @project, entities_class: 'issues' }
]
end
end