additionals/test/functional/dashboard_async_blocks_controller_test.rb

41 lines
1.2 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
2020-11-12 09:08:52 +03:00
fixtures :projects, :users, :email_addresses, :user_preferences,
2020-07-27 11:49:23 +03:00
:roles,
:members,
:member_roles,
:issues,
2020-11-12 09:08:52 +03:00
:issue_relations,
2020-07-27 11:49:23 +03:00
:issue_statuses,
:versions,
:trackers,
:projects_trackers,
:issue_categories,
:enabled_modules,
2020-11-12 09:08:52 +03:00
:journals, :journal_details,
2020-07-27 11:49:23 +03:00
:dashboards, :dashboard_roles,
2020-11-12 09:08:52 +03:00
:repositories, :changesets,
:queries, :watchers
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