@@ -269,6 +269,7 private | |||
|
269 | 269 | @priorities = IssuePriority.all |
|
270 | 270 | @edit_allowed = User.current.allowed_to?(:edit_issues, @project) |
|
271 | 271 | @time_entry = TimeEntry.new |
|
272 | @time_entry.attributes = params[:time_entry] | |
|
272 | 273 | |
|
273 | 274 | @notes = params[:notes] || (params[:issue].present? ? params[:issue][:notes] : nil) |
|
274 | 275 | @issue.init_journal(User.current, @notes) |
@@ -737,7 +737,8 class IssuesControllerTest < ActionController::TestCase | |||
|
737 | 737 | |
|
738 | 738 | def test_get_edit_with_params |
|
739 | 739 | @request.session[:user_id] = 2 |
|
740 | get :edit, :id => 1, :issue => { :status_id => 5, :priority_id => 7 } | |
|
740 | get :edit, :id => 1, :issue => { :status_id => 5, :priority_id => 7 }, | |
|
741 | :time_entry => { :hours => '2.5', :comments => 'test_get_edit_with_params', :activity_id => TimeEntryActivity.first.id } | |
|
741 | 742 | assert_response :success |
|
742 | 743 | assert_template 'edit' |
|
743 | 744 | |
@@ -755,6 +756,12 class IssuesControllerTest < ActionController::TestCase | |||
|
755 | 756 | :child => { :tag => 'option', |
|
756 | 757 | :content => 'Urgent', |
|
757 | 758 | :attributes => { :selected => 'selected' } } |
|
759 | ||
|
760 | assert_tag :input, :attributes => { :name => 'time_entry[hours]', :value => '2.5' } | |
|
761 | assert_tag :select, :attributes => { :name => 'time_entry[activity_id]' }, | |
|
762 | :child => { :tag => 'option', | |
|
763 | :attributes => { :selected => 'selected', :value => TimeEntryActivity.first.id } } | |
|
764 | assert_tag :input, :attributes => { :name => 'time_entry[comments]', :value => 'test_get_edit_with_params' } | |
|
758 | 765 | end |
|
759 | 766 | |
|
760 | 767 | def test_update_edit_form |
General Comments 0
You need to be logged in to leave comments.
Login now