if validate_parent_id && @project.copy(@source_project, :only => params[:only])
@project.set_allowed_parent!(params[:project]['parent_id']) if params[:project].has_key?('parent_id')
flash[:notice] = l(:notice_successful_create)
- redirect_to :controller => 'projects', :action => 'settings'
+ redirect_to :controller => 'projects', :action => 'settings', :id => @project
elsif !@project.new_record?
# Project was created
# But some objects were not copied due to validation failures
# (eg. issues from disabled trackers)
# TODO: inform about that
- redirect_to :controller => 'projects', :action => 'settings'
+ redirect_to :controller => 'projects', :action => 'settings', :id => @project
end
end
end
@request.session[:user_id] = 1 # admin
post :copy, :id => 1, :project => {:name => 'Copy', :identifier => 'unique-copy'}
assert_response :redirect
- assert_redirected_to :controller => 'projects', :action => 'settings'
+ assert_redirected_to :controller => 'projects', :action => 'settings', :id => 'unique-copy'
end
end