additionals/test/functional/dashboard_async_blocks_controller_test.rb

40 lines
1.3 KiB
Ruby
Raw Normal View History

# frozen_string_literal: true
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
2021-12-15 19:44:47 +03:00
fixtures :users, :email_addresses, :roles,
:enumerations,
:projects, :projects_trackers, :enabled_modules,
:members, :member_roles,
:issues, :issue_statuses, :issue_categories, :issue_relations,
2020-07-27 11:49:23 +03:00
:versions,
:trackers,
2021-12-15 19:44:47 +03:00
:workflows,
:custom_fields, :custom_values, :custom_fields_projects, :custom_fields_trackers,
:time_entries,
:watchers,
2020-11-12 09:08:52 +03:00
:journals, :journal_details,
:repositories, :changesets,
2021-12-15 19:44:47 +03:00
:queries,
:dashboards, :dashboard_roles
2020-07-27 11:49:23 +03:00
include Redmine::I18n
def setup
prepare_tests
Setting.default_language = 'en'
2020-09-07 21:13:50 +03:00
@project = projects :projects_001
2020-07-27 11:49:23 +03:00
@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