@@ -426,7 +426,7 class IssuesController < ApplicationController | |||||
426 | @issue.safe_attributes = params[:issue] |
|
426 | @issue.safe_attributes = params[:issue] | |
427 |
|
427 | |||
428 | @priorities = IssuePriority.active |
|
428 | @priorities = IssuePriority.active | |
429 |
@allowed_statuses = @issue.new_statuses_allowed_to(User.current, |
|
429 | @allowed_statuses = @issue.new_statuses_allowed_to(User.current, @issue.new_record?) | |
430 | @available_watchers = (@issue.project.users.sort + @issue.watcher_users).uniq |
|
430 | @available_watchers = (@issue.project.users.sort + @issue.watcher_users).uniq | |
431 | end |
|
431 | end | |
432 |
|
432 |
@@ -2728,6 +2728,16 class IssuesControllerTest < ActionController::TestCase | |||||
2728 | assert_equal 'This is the test_new issue', issue.subject |
|
2728 | assert_equal 'This is the test_new issue', issue.subject | |
2729 | end |
|
2729 | end | |
2730 |
|
2730 | |||
|
2731 | def test_update_form_should_propose_default_status_for_existing_issue | |||
|
2732 | @request.session[:user_id] = 2 | |||
|
2733 | WorkflowTransition.delete_all | |||
|
2734 | WorkflowTransition.create!(:role_id => 1, :tracker_id => 2, :old_status_id => 2, :new_status_id => 3) | |||
|
2735 | ||||
|
2736 | xhr :put, :update_form, :project_id => 1, :id => 2 | |||
|
2737 | assert_response :success | |||
|
2738 | assert_equal [2,3], assigns(:allowed_statuses).map(&:id).sort | |||
|
2739 | end | |||
|
2740 | ||||
2731 | def test_put_update_without_custom_fields_param |
|
2741 | def test_put_update_without_custom_fields_param | |
2732 | @request.session[:user_id] = 2 |
|
2742 | @request.session[:user_id] = 2 | |
2733 | ActionMailer::Base.deliveries.clear |
|
2743 | ActionMailer::Base.deliveries.clear |
General Comments 0
You need to be logged in to leave comments.
Login now