:f => ['tracker_id'],
:op => {
'tracker_id' => '='
- },
+ },
:v => {
'tracker_id' => ['1']
}
:f => [filter_name],
:op => {
filter_name => '='
- },
+ },
:v => {
filter_name => ['Foo']
- },
+ },
:c => ['project']
}
assert_response :success
:f => ['start_date'],
:op => {
:start_date => '='
- },
+ },
:format => 'csv'
}
assert_equal 'text/csv', @response.content_type
end
end
assert_select 'title', :text => "Bug #1: Cannot print recipes - eCookbook - Redmine"
+
+ # action_menu for anonymous role
+ assert_select 'div.contextual' do
+ assert_select 'a[href=?]', '/issues/1/edit'
+ assert_select "form[data-cm-url=?]", '/issues/context_menu' do
+ assert_select 'span[class=?]', 'hascontextmenu'
+ end
+ end
end
def test_show_by_manager
assert_select 'textarea[name=?]', 'issue[notes]'
end
end
+
+ # action_menu for manager role
+ assert_select "div.contextual" do
+ assert_select 'a[href=?]', '/issues/1/edit'
+ assert_select 'a[href=?]', '/issues/1/time_entries/new'
+ assert_select 'a[href=?]', '/watchers/watch?object_id=1&object_type=issue'
+ assert_select 'a[href=?]', '/projects/ecookbook/issues/1/copy'
+ assert_select 'a[href=?][data-method=?]', '/issues/1', 'delete'
+ assert_select 'form[data-cm-url=?]', '/issues/context_menu' do
+ assert_select 'span[class=?]', 'hascontextmenu'
+ end
+ end
end
def test_show_should_display_update_form
:tracker_id => 3,
:description => 'Prefilled',
:custom_field_values => {
- '2' => 'Custom field value'}
+ '2' => 'Custom field value'}
}
}
assert !t.disabled_core_fields.include?('parent_issue_id')
get :new, :params => {
- :project_id => 1, issue: { parent_issue_id: 1
+ :project_id => 1, issue: { parent_issue_id: 1
}
}
assert_response :success
t.save!
assert t.disabled_core_fields.include?('parent_issue_id')
get :new, :params => {
- :project_id => 1, issue: { parent_issue_id: 1
+ :project_id => 1, issue: { parent_issue_id: 1
}
}
assert_response :success
:issue => {
:tracker_id => 2,
:status_id => 1
- },
+ },
:was_default_status => 1
}
assert_response :success
:issue => {
:project_id => 1,
:fixed_version_id => ''
- },
+ },
:form_update_triggered_by => 'issue_project_id'
}
assert_response :success
:start_date => '2010-11-07',
:estimated_hours => '',
:custom_field_values => {
- '2' => 'Value for field 2'}
+ '2' => 'Value for field 2'}
}
}
end
:priority_id => 5,
:estimated_hours => '',
:custom_field_values => {
- '2' => 'Value for field 2'}
+ '2' => 'Value for field 2'}
}
}
end
:priority_id => 5,
:estimated_hours => '',
:custom_field_values => {
- '2' => 'Value for field 2'}
+ '2' => 'Value for field 2'}
}
}
end
:tracker_id => 3,
:subject => 'This is first issue',
:priority_id => 5
- },
+ },
:continue => ''
}
end
:description => 'This is the description',
:priority_id => 5,
:custom_field_values => {
- '1' => ['', 'MySQL', 'Oracle']}
+ '1' => ['', 'MySQL', 'Oracle']}
}
}
end
:description => 'This is the description',
:priority_id => 5,
:custom_field_values => {
- '1' => ['']}
+ '1' => ['']}
}
}
end
:description => 'This is the description',
:priority_id => 5,
:custom_field_values => {
- field.id.to_s => ['', '2', '3']}
+ field.id.to_s => ['', '2', '3']}
}
}
end
:due_date => '',
:custom_field_values => {
cf1.id.to_s => '', cf2.id.to_s => ''
- }
-
+ }
+
}
}
assert_response :success
:due_date => '',
:custom_field_values => {
cf1.id.to_s => '', cf2.id.to_s => ['']
- }
-
+ }
+
}
}
assert_response :success
:due_date => '2012-07-16',
:custom_field_values => {
cf1.id.to_s => 'value1', cf2.id.to_s => 'value2'
- }
-
+ }
+
}
}
assert_response 302
:tracker_id => 1,
:status_id => 1,
:subject => 'Test'
-
+
}
}
assert_response 302
:project_id => 3,
:tracker_id => 2,
:subject => 'Foo'
- },
+ },
:continue => '1'
}
assert_redirected_to '/issues/new?issue%5Bproject_id%5D=3&issue%5Btracker_id%5D=2'
:priority_id => 5,
:estimated_hours => '',
:custom_field_values => {
- '2' => 'Value for field 2'}
+ '2' => 'Value for field 2'}
}
}
end
post :create, :params => {
:project_id => 1,
:issue => {
- :tracker => "A param can not be a Tracker"
+ :tracker => "A param can not be a Tracker"
}
}
end
:project_id => 1,
:issue => {
:tracker_id => '1',
- :subject => 'With attachment'
- },
+ :subject => 'With attachment'
+ },
:attachments => {
'1' => {
- 'file' => uploaded_test_file('testfile.txt', 'text/plain'), 'description' => 'test file'}
+ 'file' => uploaded_test_file('testfile.txt', 'text/plain'), 'description' => 'test file'}
}
}
end
:project_id => 1,
:issue => {
:tracker_id => '1',
- :subject => 'With attachment'
- },
+ :subject => 'With attachment'
+ },
:attachments => {
'1' => {
- 'file' => uploaded_test_file('testfile.txt', 'text/plain'), 'description' => 'test file'}
+ 'file' => uploaded_test_file('testfile.txt', 'text/plain'), 'description' => 'test file'}
}
}
end
:project_id => 1,
:issue => {
:tracker_id => '1',
- :subject => ''
- },
+ :subject => ''
+ },
:attachments => {
'1' => {
- 'file' => uploaded_test_file('testfile.txt', 'text/plain'), 'description' => 'test file'}
+ 'file' => uploaded_test_file('testfile.txt', 'text/plain'), 'description' => 'test file'}
}
}
assert_response :success
:project_id => 1,
:issue => {
:tracker_id => '1',
- :subject => ''
- },
+ :subject => ''
+ },
:attachments => {
'p0' => {
- 'token' => attachment.token}
+ 'token' => attachment.token}
}
}
assert_response :success
:project_id => 1,
:issue => {
:tracker_id => '1',
- :subject => 'Saved attachments'
- },
+ :subject => 'Saved attachments'
+ },
:attachments => {
'p0' => {
- 'token' => attachment.token}
+ 'token' => attachment.token}
}
}
assert_response 302
:project_id => '1',
:tracker_id => '1',
:status_id => '1'
- },
+ },
:was_default_status => '1'
}
end
:tracker_id => '3',
:status_id => '1',
:subject => 'Copy with attachments'
- },
+ },
:copy_attachments => '1'
}
end
:tracker_id => '3',
:status_id => '1',
:subject => 'Copy with attachments'
- },
+ },
:copy_attachments => '1',
:attachments => {
'1' => {
:tracker_id => '3',
:status_id => '1',
:subject => 'Copy with subtasks'
- },
+ },
:copy_subtasks => '1'
}
end
:status_id => '1',
:subject => 'Copy with subtasks',
:custom_field_values => {
- '2' => 'Foo'}
- },
+ '2' => 'Foo'}
+ },
:copy_subtasks => '1'
}
end
:id => 1,
:issue => {
:status_id => 5,
- :priority_id => 7
- },
+ :priority_id => 7
+ },
:time_entry => {
:hours => '2.5',
:comments => 'test_get_edit_with_params',
- :activity_id => 10
+ :activity_id => 10
}
}
assert_response :success
:project_id => '1',
:tracker_id => '2',
:priority_id => '6'
-
+
}
}
end
:issue => {
:subject => 'Custom field change',
:custom_field_values => {
- '1' => ['', 'Oracle', 'PostgreSQL']
- }
-
+ '1' => ['', 'Oracle', 'PostgreSQL']
+ }
+
}
}
end
:issue => {
:status_id => 2,
:assigned_to_id => 3,
- :notes => 'Assigned to dlopper'
- },
+ :notes => 'Assigned to dlopper'
+ },
:time_entry => {
:hours => '',
:comments => '',
- :activity_id => TimeEntryActivity.first
+ :activity_id => TimeEntryActivity.first
}
}
end
put :update, :params => {
:id => 1,
:issue => {
- :notes => notes
+ :notes => notes
}
}
end
put :update, :params => {
:id => 1,
:issue => {
- :notes => '2.5 hours added'
- },
+ :notes => '2.5 hours added'
+ },
:time_entry => {
:hours => '2.5',
:comments => 'test_put_update_with_note_and_spent_time',
- :activity_id => TimeEntryActivity.first.id
+ :activity_id => TimeEntryActivity.first.id
}
}
end
:id => 1,
:issue => {
:notes => ''
- },
+ },
:attachments => {
'1' => {
- 'file' => uploaded_test_file('testfile.txt', 'text/plain'), 'description' => 'test file'}
+ 'file' => uploaded_test_file('testfile.txt', 'text/plain'), 'description' => 'test file'}
}
}
end
put :update, :params => {
:id => 1,
:issue => {
- :subject => ''
- },
+ :subject => ''
+ },
:attachments => {
'1' => {
- 'file' => uploaded_test_file('testfile.txt', 'text/plain'), 'description' => 'test file'}
+ 'file' => uploaded_test_file('testfile.txt', 'text/plain'), 'description' => 'test file'}
}
}
assert_response :success
put :update, :params => {
:id => 1,
:issue => {
- :subject => ''
- },
+ :subject => ''
+ },
:attachments => {
'p0' => {
- 'token' => attachment.token}
+ 'token' => attachment.token}
}
}
assert_response :success
:id => 1,
:issue => {
:notes => 'Attachment added'
- },
+ },
:attachments => {
'p0' => {
- 'token' => attachment.token}
+ 'token' => attachment.token}
}
}
assert_redirected_to '/issues/1'
:id => 1,
:issue => {
:notes => ''
- },
+ },
:attachments => {
'1' => {
- 'file' => uploaded_test_file('testfile.txt', 'text/plain')}
+ 'file' => uploaded_test_file('testfile.txt', 'text/plain')}
}
}
assert_redirected_to :action => 'show', :id => '1'
:issue => {
:notes => 'Removing attachments',
:deleted_attachment_ids => ['1', '5']
-
+
}
}
end
:subject => '',
:notes => 'Removing attachments',
:deleted_attachment_ids => ['1', '5']
-
+
}
}
end
:subject => new_subject,
:priority_id => '6',
:category_id => '1' # no change
-
+
}
}
assert_equal 1, ActionMailer::Base.deliveries.size
:id => 1,
:issue => {
:notes => notes
- },
+ },
:time_entry => {
"comments"=>"", "activity_id"=>"", "hours"=>"2z"
}
:id => 1,
:issue => {
:notes => notes
- },
+ },
:time_entry => {
"comments"=>"this is my comment", "activity_id"=>"", "hours"=>""
}
:id => issue.id,
:issue => {
:fixed_version_id => 4
-
+
}
}
:id => issue.id,
:issue => {
:fixed_version_id => 4
-
- },
+
+ },
:back_url => '/issues'
}
:id => issue.id,
:issue => {
:fixed_version_id => 4
-
- },
+
+ },
:back_url => 'http://google.com'
}
:issue => {
:status_id => 6,
:notes => 'Notes'
- },
+ },
:prev_issue_id => 8,
:next_issue_id => 12,
:issue_position => 2,
:priority_id => 7,
:assigned_to_id => '',
:custom_field_values => {
- '2' => ''}
+ '2' => ''}
}
}
:priority_id => '',
:assigned_to_id => group.id,
:custom_field_values => {
- '2' => ''}
+ '2' => ''}
}
}
:priority_id => 7,
:assigned_to_id => '',
:custom_field_values => {
- '2' => ''}
+ '2' => ''}
}
}
:priority_id => 7,
:assigned_to_id => '',
:custom_field_values => {
- '2' => ''}
+ '2' => ''}
}
}
assert_response 403
:id => 1,
:issue => {
:project_id => '2'
- },
+ },
:follow => '1'
}
assert_redirected_to '/issues/1'
:id => [1, 2],
:issue => {
:project_id => '2'
- },
+ },
:follow => '1'
}
assert_redirected_to '/projects/onlinestore/issues'
:priority_id => '',
:assigned_to_id => '',
:custom_field_values => {
- '2' => '777'}
+ '2' => '777'}
}
}
:priority_id => '',
:assigned_to_id => '',
:custom_field_values => {
- '1' => '__none__'}
+ '1' => '__none__'}
}
}
assert_response 302
:priority_id => '',
:assigned_to_id => '',
:custom_field_values => {
- '1' => ['MySQL', 'Oracle']}
+ '1' => ['MySQL', 'Oracle']}
}
}
:priority_id => '',
:assigned_to_id => '',
:custom_field_values => {
- '1' => ['__none__']}
+ '1' => ['__none__']}
}
}
assert_response 302
:ids => [1, 2],
:issue => {
:project_id => '2'
- },
+ },
:copy => '1'
}
end
:ids => [1, 2, 3],
:issue => {
:project_id => '2'
- },
+ },
:copy => '1'
}
assert_response 302
:ids => [1, 2, 3],
:issue => {
:project_id => ''
- },
+ },
:copy => '1'
}
assert_response 403
:ids => [1, 2, 3],
:issue => {
:project_id => '1'
- },
+ },
:copy => '1'
}
assert_response 403
:status_id => '',
:start_date => '',
:due_date => ''
-
+
}
}
end
:status_id => '1',
:start_date => '2009-12-01',
:due_date => '2009-12-31'
-
+
}
}
end
:status_id => '3',
:start_date => '2009-12-01',
:due_date => '2009-12-31'
-
+
}
}
end
:copy_attachments => '0',
:issue => {
:project_id => ''
-
+
}
}
end
:copy_attachments => '1',
:issue => {
:project_id => ''
-
+
}
}
end
:link_copy => '1',
:issue => {
:project_id => '1'
-
+
}
}
end
:copy_subtasks => '0',
:issue => {
:project_id => ''
-
+
}
}
end
:copy_subtasks => '1',
:issue => {
:project_id => ''
-
+
}
}
end
:copy_watchers => '1',
:issue => {
:project_id => ''
-
+
}
}
end
:copy_subtasks => '1',
:issue => {
:project_id => ''
-
+
}
}
end
:copy => '1',
:issue => {
:project_id => 2
- },
+ },
:follow => '1'
}
issue = Issue.order('id DESC').first