mirror of
https://github.com/meineerde/redmine.git
synced 2026-02-01 03:57:15 +00:00
shorten long line of TimeEntryQueryTest
git-svn-id: http://svn.redmine.org/redmine/trunk@20165 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
af0f1c878a
commit
6896ad12fe
@ -88,9 +88,12 @@ class TimeEntryQueryTest < ActiveSupport::TestCase
|
||||
|
||||
def test_project_query_should_include_project_issue_custom_fields_only_as_filters
|
||||
global = IssueCustomField.generate!(:is_for_all => true, :is_filter => true)
|
||||
field_on_project = IssueCustomField.generate!(:is_for_all => false, :project_ids => [3], :is_filter => true)
|
||||
field_not_on_project = IssueCustomField.generate!(:is_for_all => false, :project_ids => [1,2], :is_filter => true)
|
||||
|
||||
field_on_project =
|
||||
IssueCustomField.generate!(:is_for_all => false, :project_ids => [3],
|
||||
:is_filter => true)
|
||||
field_not_on_project =
|
||||
IssueCustomField.generate!(:is_for_all => false, :project_ids => [1, 2],
|
||||
:is_filter => true)
|
||||
query = TimeEntryQuery.new(:project => Project.find(3))
|
||||
|
||||
assert_include "issue.cf_#{global.id}", query.available_filters.keys
|
||||
@ -100,9 +103,12 @@ class TimeEntryQueryTest < ActiveSupport::TestCase
|
||||
|
||||
def test_project_query_should_include_project_issue_custom_fields_only_as_columns
|
||||
global = IssueCustomField.generate!(:is_for_all => true, :is_filter => true)
|
||||
field_on_project = IssueCustomField.generate!(:is_for_all => false, :project_ids => [3], :is_filter => true)
|
||||
field_not_on_project = IssueCustomField.generate!(:is_for_all => false, :project_ids => [1,2], :is_filter => true)
|
||||
|
||||
field_on_project =
|
||||
IssueCustomField.generate!(:is_for_all => false, :project_ids => [3],
|
||||
:is_filter => true)
|
||||
field_not_on_project =
|
||||
IssueCustomField.generate!(:is_for_all => false, :project_ids => [1, 2],
|
||||
:is_filter => true)
|
||||
query = TimeEntryQuery.new(:project => Project.find(3))
|
||||
|
||||
assert_include "issue.cf_#{global.id}", query.available_columns.map(&:name).map(&:to_s)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user