@@ -410,7 +410,7 class IssuesController < ApplicationController | |||||
410 | @issue.safe_attributes = params[:issue] |
|
410 | @issue.safe_attributes = params[:issue] | |
411 |
|
411 | |||
412 | @priorities = IssuePriority.active |
|
412 | @priorities = IssuePriority.active | |
413 |
@allowed_statuses = @issue.new_statuses_allowed_to(User.current, |
|
413 | @allowed_statuses = @issue.new_statuses_allowed_to(User.current, @issue.new_record?) | |
414 | @available_watchers = (@issue.project.users.sort + @issue.watcher_users).uniq |
|
414 | @available_watchers = (@issue.project.users.sort + @issue.watcher_users).uniq | |
415 | end |
|
415 | end | |
416 |
|
416 |
@@ -2720,6 +2720,16 class IssuesControllerTest < ActionController::TestCase | |||||
2720 | assert_equal 'This is the test_new issue', issue.subject |
|
2720 | assert_equal 'This is the test_new issue', issue.subject | |
2721 | end |
|
2721 | end | |
2722 |
|
2722 | |||
|
2723 | def test_update_form_should_propose_default_status_for_existing_issue | |||
|
2724 | @request.session[:user_id] = 2 | |||
|
2725 | WorkflowTransition.delete_all | |||
|
2726 | WorkflowTransition.create!(:role_id => 1, :tracker_id => 2, :old_status_id => 2, :new_status_id => 3) | |||
|
2727 | ||||
|
2728 | xhr :put, :update_form, :project_id => 1, :id => 2 | |||
|
2729 | assert_response :success | |||
|
2730 | assert_equal [2,3], assigns(:allowed_statuses).map(&:id).sort | |||
|
2731 | end | |||
|
2732 | ||||
2723 | def test_put_update_without_custom_fields_param |
|
2733 | def test_put_update_without_custom_fields_param | |
2724 | @request.session[:user_id] = 2 |
|
2734 | @request.session[:user_id] = 2 | |
2725 | ActionMailer::Base.deliveries.clear |
|
2735 | ActionMailer::Base.deliveries.clear |
General Comments 0
You need to be logged in to leave comments.
Login now