#139 fix coding standard and remove none for author patch (because there is always an author)
This commit is contained in:
parent
d1f808c8d7
commit
08ee320e23
@ -15,9 +15,11 @@ module Additionals
|
||||
return if @rows.nil?
|
||||
|
||||
if Setting.issue_group_assignment? && params[:detail] == 'assigned_to'
|
||||
@rows = @project.visible_principals + [User.new(:firstname => "[#{l(:label_none)}]")]
|
||||
elsif %w[assigned_to author].include? params[:detail]
|
||||
@rows = @project.visible_users + [User.new(:firstname => "[#{l(:label_none)}]")]
|
||||
@rows = @project.visible_principals + [User.new(firstname: "[#{l :label_none}]")]
|
||||
elsif params[:detail] == 'assigned_to'
|
||||
@rows = @project.visible_users + [User.new(firstname: "[#{l :label_none}]")]
|
||||
elsif params[:detail] == 'author'
|
||||
@rows = @project.visible_users
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -16,23 +16,20 @@ class ReportsControllerTest < Additionals::ControllerTest
|
||||
Issue.delete_all
|
||||
Issue.generate!
|
||||
Issue.generate!
|
||||
Issue.generate!(:status_id => 5)
|
||||
Issue.generate!(:assigned_to_id => 2)
|
||||
Issue.generate! status_id: 5
|
||||
Issue.generate! assigned_to_id: 2
|
||||
|
||||
get :issue_report_details,
|
||||
params: { id: 1,
|
||||
detail: 'assigned_to' }
|
||||
|
||||
get(
|
||||
:issue_report_details,
|
||||
:params => {
|
||||
:id => 1,
|
||||
:detail => 'assigned_to'
|
||||
}
|
||||
)
|
||||
assert_select 'table.list tbody :last-child' do
|
||||
assert_select 'td', :text => "[#{I18n.t(:label_none)}]"
|
||||
assert_select ':nth-child(2)', :text => '2' # status:1
|
||||
assert_select ':nth-child(6)', :text => '1' # status:5
|
||||
assert_select ':nth-child(8)', :text => '2' # open
|
||||
assert_select ':nth-child(9)', :text => '1' # closed
|
||||
assert_select ':nth-child(10)', :text => '3' # total
|
||||
assert_select 'td', text: "[#{I18n.t :label_none}]"
|
||||
assert_select ':nth-child(2)', text: '2' # status:1
|
||||
assert_select ':nth-child(6)', text: '1' # status:5
|
||||
assert_select ':nth-child(8)', text: '2' # open
|
||||
assert_select ':nth-child(9)', text: '1' # closed
|
||||
assert_select ':nth-child(10)', text: '3' # total
|
||||
end
|
||||
end
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user