mirror of
https://github.com/redmine/redmine.git
synced 2025-11-13 00:36:01 +01:00
Fixed "First argument in form cannot contain nil or be empty" error (#18275).
git-svn-id: http://svn.redmine.org/redmine/trunk@13661 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -24,12 +24,12 @@
|
||||
</ul>
|
||||
|
||||
<% if manage_allowed %>
|
||||
<%= form_for(@issue, :as => :issue, :remote => true,
|
||||
:url => {:controller => 'repositories', :action => 'add_related_issue',
|
||||
<%= form_tag({:controller => 'repositories', :action => 'add_related_issue',
|
||||
:id => @project, :repository_id => @repository.identifier_param,
|
||||
:rev => @changeset.identifier},
|
||||
:remote => true,
|
||||
:method => :post,
|
||||
:html => {:id => 'new-relation-form', :style => (@issue ? '' : 'display: none;')}) do |f| %>
|
||||
:id => 'new-relation-form', :style => (@issue ? '' : 'display: none;')) do |f| %>
|
||||
<%= l(:label_issue) %> #<%= text_field_tag 'issue_id', '', :size => 10 %>
|
||||
<%= submit_tag l(:button_add) %>
|
||||
<%= toggle_link l(:button_cancel), 'new-relation-form'%>
|
||||
|
||||
@@ -166,6 +166,18 @@ class RepositoriesControllerTest < ActionController::TestCase
|
||||
assert_equal "1", assigns(:changeset).revision
|
||||
end
|
||||
|
||||
def test_revision_should_show_add_related_issue_form
|
||||
Role.find(1).add_permission! :manage_related_issues
|
||||
@request.session[:user_id] = 2
|
||||
|
||||
get :revision, :id => 1, :rev => 1
|
||||
assert_response :success
|
||||
|
||||
assert_select 'form[action=?]', '/projects/ecookbook/repository/revisions/1/issues' do
|
||||
assert_select 'input[name=?]', 'issue_id'
|
||||
end
|
||||
end
|
||||
|
||||
def test_revision_should_not_change_the_project_menu_link
|
||||
get :revision, :id => 1, :rev => 1
|
||||
assert_response :success
|
||||
|
||||
Reference in New Issue
Block a user