:workflows
def test_get_issue_report
- get :issue_report, :params => {
+ get(
+ :issue_report,
+ :params => {
:id => 1
}
+ )
assert_response :success
end
def test_issue_report_with_subprojects_issues
Setting.stubs(:display_subprojects_issues?).returns(true)
- get :issue_report, :params => {
+ get(
+ :issue_report,
+ :params => {
:id => 1
}
-
+ )
assert_response :success
# Count subprojects issues
assert_select 'table.list tbody :nth-child(1):first' do
def test_issue_report_without_subprojects_issues
Setting.stubs(:display_subprojects_issues?).returns(false)
- get :issue_report, :params => {
+ get(
+ :issue_report,
+ :params => {
:id => 1
}
-
+ )
assert_response :success
# Do not count subprojects issues
assert_select 'table.list tbody :nth-child(1):first' do
def test_get_issue_report_details
%w(tracker version priority category assigned_to author subproject).each do |detail|
- get :issue_report_details, :params => {
+ get(
+ :issue_report_details,
+ :params => {
:id => 1,
:detail => detail
}
+ )
assert_response :success
end
end
def test_get_issue_report_details_by_tracker_with_subprojects_issues
Setting.stubs(:display_subprojects_issues?).returns(true)
- get :issue_report_details, :params => {
+ get(
+ :issue_report_details,
+ :params => {
:id => 1,
:detail => 'tracker'
}
-
+ )
assert_response :success
# Count subprojects issues
assert_select 'table.list tbody :nth-child(1)' do
Issue.generate!(:tracker_id => 1, :status_id => 5)
Issue.generate!(:tracker_id => 2)
- get :issue_report_details, :params => {
+ get(
+ :issue_report_details,
+ :params => {
:id => 1,
:detail => 'tracker'
}
+ )
assert_select 'table.list tbody :nth-child(1)' do
assert_select 'td', :text => 'Bug'
assert_select ':nth-child(2)', :text => '2' # status:1
end
def test_get_issue_report_details_with_an_invalid_detail
- get :issue_report_details, :params => {
+ get(
+ :issue_report_details,
+ :params => {
:id => 1,
:detail => 'invalid'
}
+ )
assert_response 404
end
end