Feature #13315 » 13315.patch
| app/controllers/context_menus_controller.rb | ||
|---|---|---|
|
class ContextMenusController < ApplicationController
|
||
|
helper :watchers
|
||
|
helper :issues
|
||
|
helper :projects
|
||
|
before_action :find_issues, :only => :issues
|
||
| ... | ... | |
|
render :layout => false
|
||
|
end
|
||
|
def versions
|
||
|
@versions = Version.where(:id => params[:ids]).preload(:project).to_a
|
||
|
(render_404; return) unless @versions.present?
|
||
|
if @versions.size == 1
|
||
|
@version = @versions.first
|
||
|
end
|
||
|
@version_ids = @versions.collect(&:id).sort
|
||
|
@allowed_statuses = Version::VERSION_STATUSES
|
||
|
@allowed_sharings = Version::VERSION_SHARINGS
|
||
|
projects = @versions.collect(&:project).compact.uniq
|
||
|
project = projects.first if projects.size == 1
|
||
|
edit_allowed =
|
||
|
if project
|
||
|
User.current.allowed_to?(:manage_versions, project) && @versions.all?{|version| version.project == project}
|
||
|
else
|
||
|
false
|
||
|
end
|
||
|
@can = {:edit => edit_allowed, :delete => edit_allowed}
|
||
|
@back = back_url
|
||
|
render :layout => false
|
||
|
end
|
||
|
end
|
||
| app/controllers/versions_controller.rb | ||
|---|---|---|
|
class VersionsController < ApplicationController
|
||
|
menu_item :roadmap
|
||
|
model_object Version
|
||
|
before_action :find_model_object, :except => [:index, :new, :create, :close_completed]
|
||
|
before_action :find_project_from_association, :except => [:index, :new, :create, :close_completed]
|
||
|
before_action :find_model_object, :except => [:index, :new, :create, :close_completed, :destroy, :bulk_update]
|
||
|
before_action :find_project_from_association, :except => [:index, :new, :create, :close_completed, :destroy, :bulk_update]
|
||
|
before_action :find_project_by_project_id, :only => [:index, :new, :create, :close_completed]
|
||
|
before_action :find_versions, :only => [:destroy, :bulk_update]
|
||
|
before_action :authorize
|
||
|
accept_api_auth :index, :show, :create, :update, :destroy
|
||
| ... | ... | |
|
end
|
||
|
def destroy
|
||
|
if @version.deletable?
|
||
|
@version.destroy
|
||
|
respond_to do |format|
|
||
|
format.html {redirect_back_or_default settings_project_path(@project, :tab => 'versions')}
|
||
|
format.api {render_api_ok}
|
||
|
destroyed = Version.transaction do
|
||
|
@versions.each do |v|
|
||
|
unless v.deletable?
|
||
|
raise ActiveRecord::Rollback
|
||
|
end
|
||
|
unless v.destroy && v.destroyed?
|
||
|
raise ActiveRecord::Rollback
|
||
|
end
|
||
|
end
|
||
|
else
|
||
|
respond_to do |format|
|
||
|
format.html do
|
||
|
end
|
||
|
respond_to do |format|
|
||
|
format.html do
|
||
|
if destroyed
|
||
|
flash[:notice] = l(:notice_successful_delete)
|
||
|
else
|
||
|
flash[:error] = l(:notice_unable_delete_version)
|
||
|
redirect_to settings_project_path(@project, :tab => 'versions')
|
||
|
end
|
||
|
format.api {head :unprocessable_entity}
|
||
|
redirect_back_or_default settings_project_path(@project, :tab => 'versions')
|
||
|
end
|
||
|
format.api do
|
||
|
if destroyed
|
||
|
render_api_ok
|
||
|
else
|
||
|
head :unprocessable_entity
|
||
|
end
|
||
|
end
|
||
|
end
|
||
|
end
|
||
| ... | ... | |
|
end
|
||
|
end
|
||
|
def bulk_update
|
||
|
attributes = parse_params_for_bulk_update(params[:version])
|
||
|
unsaved_versions = []
|
||
|
saved_versions = []
|
||
|
Version.transaction do
|
||
|
@versions.each do |version|
|
||
|
version.reload
|
||
|
attrs = attributes.dup
|
||
|
attrs.delete('sharing') unless version.allowed_sharings.include?(attrs['sharing'])
|
||
|
version.safe_attributes = attrs
|
||
|
next unless version.changed?
|
||
|
call_hook(
|
||
|
:controller_versions_bulk_update_before_save,
|
||
|
{:params => params, :version => version}
|
||
|
)
|
||
|
if version.save
|
||
|
saved_versions << version
|
||
|
else
|
||
|
flash[:error] = version.errors.full_messages.join(', ') unless flash[:error]
|
||
|
unsaved_versions << version
|
||
|
raise ActiveRecord::Rollback
|
||
|
end
|
||
|
end
|
||
|
end
|
||
|
if unsaved_versions.empty? && saved_versions.present?
|
||
|
flash[:notice] = l(:notice_successful_update)
|
||
|
end
|
||
|
redirect_back_or_default settings_project_path(@project, :tab => :versions)
|
||
|
end
|
||
|
private
|
||
|
def find_versions
|
||
|
@versions = Version.where(:id => params[:id] || params[:ids]).preload(:project).to_a
|
||
|
raise ActiveRecord::RecordNotFound if @versions.empty?
|
||
|
projects = @versions.collect(&:project).compact.uniq
|
||
|
@project = projects.first if projects.size == 1
|
||
|
rescue ActiveRecord::RecordNotFound
|
||
|
render_404
|
||
|
end
|
||
|
def retrieve_selected_tracker_ids(selectable_trackers, default_trackers=nil)
|
||
|
if ids = params[:tracker_ids]
|
||
|
@selected_tracker_ids =
|
||
| app/helpers/routes_helper.rb | ||
|---|---|---|
|
end
|
||
|
end
|
||
|
def _bulk_update_versions_path(version, *args)
|
||
|
if version
|
||
|
version_path(version, *args)
|
||
|
else
|
||
|
bulk_update_versions_path(*args)
|
||
|
end
|
||
|
end
|
||
|
def board_path(board, *args)
|
||
|
project_board_path(board.project, board, *args)
|
||
|
end
|
||
| app/views/context_menus/versions.html.erb | ||
|---|---|---|
|
<ul>
|
||
|
<%= call_hook(:view_versions_context_menu_start, {:versions => @versions, :can => @can, :back => @back }) %>
|
||
|
<% if @version -%>
|
||
|
<li><%= context_menu_link l(:button_edit), edit_version_path(@version),
|
||
|
:class => 'icon icon-edit', :disabled => !@can[:edit] %></li>
|
||
|
<% end -%>
|
||
|
<% if @allowed_statuses.present? -%>
|
||
|
<li class="folder">
|
||
|
<a href="#" class="submenu"><%= l(:field_status) %></a>
|
||
|
<ul>
|
||
|
<% @allowed_statuses.each do |s| -%>
|
||
|
<li>
|
||
|
<%= context_menu_link(
|
||
|
l("version_status_#{s}"),
|
||
|
_bulk_update_versions_path(
|
||
|
@version,
|
||
|
:ids => @version_ids, :version => {:status => s}, :back_url => @back
|
||
|
),
|
||
|
:method => :patch,
|
||
|
:selected => (@version && s == @version.status), :disabled => !@can[:edit]
|
||
|
) %>
|
||
|
</li>
|
||
|
<% end -%>
|
||
|
</ul>
|
||
|
</li>
|
||
|
<% end -%>
|
||
|
<% if @allowed_sharings.present? -%>
|
||
|
<li class="folder">
|
||
|
<a href="#" class="submenu"><%= l(:field_sharing) %></a>
|
||
|
<ul>
|
||
|
<% @allowed_sharings.each do |s| -%>
|
||
|
<li>
|
||
|
<%= context_menu_link(
|
||
|
format_version_sharing(s),
|
||
|
_bulk_update_versions_path(
|
||
|
@version,
|
||
|
:ids => @version_ids, :version => {:sharing => s}, :back_url => @back
|
||
|
),
|
||
|
:method => :patch,
|
||
|
:selected => (@version && s == @version.sharing), :disabled => !@can[:edit]
|
||
|
) %>
|
||
|
</li>
|
||
|
<% end -%>
|
||
|
</ul>
|
||
|
</li>
|
||
|
<% end -%>
|
||
|
<li><%= context_menu_link l(:button_delete), versions_path(:ids => @version_ids, :back_url => @back),
|
||
|
:method => :delete, :data => {:confirm => l(:text_versions_destroy_confirmation)}, :class => 'icon icon-del', :disabled => !@can[:delete] %></li>
|
||
|
<%= call_hook(:view_versions_context_menu_end, {:versions => @versions, :can => @can, :back => @back }) %>
|
||
|
</ul>
|
||
| app/views/projects/settings.html.erb | ||
|---|---|---|
|
<%= render_tabs project_settings_tabs %>
|
||
|
<% html_title(l(:label_settings)) -%>
|
||
|
<%= context_menu %>
|
||
| app/views/projects/settings/_versions.html.erb | ||
|---|---|---|
|
|
||
|
<% if @versions.present? %>
|
||
|
<%= form_tag({}, :data => {:cm_url => versions_context_menu_path}) do %>
|
||
|
<% is_allowed_manage_versions = User.current.allowed_to?(:manage_versions, @project) %>
|
||
|
<table class="list versions">
|
||
|
<thead><tr>
|
||
|
<th class="checkbox hide-when-print">
|
||
|
<% if is_allowed_manage_versions && @versions.any?{|version| version.project == @project} %>
|
||
|
<%= check_box_tag 'check_all', '', false, :class => 'toggle-selection',
|
||
|
:title => "#{l(:button_check_all)}/#{l(:button_uncheck_all)}" %>
|
||
|
<% end %>
|
||
|
</th>
|
||
|
<th><%= l(:label_version) %></th>
|
||
|
<th><%= l(:field_default_version) %></th>
|
||
|
<th><%= l(:field_effective_date) %></th>
|
||
| ... | ... | |
|
</tr></thead>
|
||
|
<tbody>
|
||
|
<% @versions.each do |version| %>
|
||
|
<tr class="version <%=h version.status %> <%= 'shared' if version.project != @project %>">
|
||
|
<% is_manage_version = (version.project == @project && is_allowed_manage_versions) %>
|
||
|
<tr class="version <%=h version.status %><%= ' shared' if version.project != @project %><%= ' hascontextmenu' if is_manage_version %>">
|
||
|
<td class="checkbox hide-when-print">
|
||
|
<% if is_manage_version %>
|
||
|
<%= check_box_tag("ids[]", version.id, false, :id => nil) %>
|
||
|
<% end %>
|
||
|
</td>
|
||
|
<td class="name <%= 'icon icon-shared' if version.project != @project %>"><%= link_to_version version %></td>
|
||
|
<td class="tick"><%= checked_image(version.id == @project.default_version_id) %></td>
|
||
|
<td class="date"><%= format_date(version.effective_date) %></td>
|
||
| ... | ... | |
|
<td class="sharing"><%=h format_version_sharing(version.sharing) %></td>
|
||
|
<td><%= link_to_if_authorized(version.wiki_page_title, {:controller => 'wiki', :action => 'show', :project_id => version.project, :id => Wiki.titleize(version.wiki_page_title)}) || h(version.wiki_page_title) unless version.wiki_page_title.blank? || version.project.wiki.nil? %></td>
|
||
|
<td class="buttons">
|
||
|
<% if version.project == @project && User.current.allowed_to?(:manage_versions, @project) %>
|
||
|
<% if is_manage_version %>
|
||
|
<%= link_to l(:button_edit), edit_version_path(version), :class => 'icon icon-edit' %>
|
||
|
<%= delete_link version_path(version) %>
|
||
|
<% end %>
|
||
| ... | ... | |
|
<% end %>
|
||
|
</tbody>
|
||
|
</table>
|
||
|
<% end %>
|
||
|
<% else %>
|
||
|
<p class="nodata"><%= l(:label_no_data) %></p>
|
||
|
<% end %>
|
||
| config/locales/en.yml | ||
|---|---|---|
|
text_no_subject: no subject
|
||
|
text_allowed_queries_to_select: Public (to any users) queries only selectable
|
||
|
text_setting_config_change: You can configure the behaviour in config/configuration.yml. Please restart the application after editing it.
|
||
|
text_versions_destroy_confirmation: 'Are you sure you want to delete the selected version(s)?'
|
||
|
default_role_manager: Manager
|
||
|
default_role_developer: Developer
|
||
| config/routes.rb | ||
|---|---|---|
|
match '/news/:id/comments', :to => 'comments#create', :via => :post
|
||
|
match '/news/:id/comments/:comment_id', :to => 'comments#destroy', :via => :delete
|
||
|
match '/versions/context_menu', :to => 'context_menus#versions', :as => :versions_context_menu, :via => [:get, :post]
|
||
|
delete '/versions', :to => 'versions#destroy'
|
||
|
resources :versions, :only => [:show, :edit, :update, :destroy] do
|
||
|
post 'status_by', :on => :member
|
||
|
collection do
|
||
|
patch 'bulk_update'
|
||
|
end
|
||
|
end
|
||
|
resources :documents, :only => [:show, :edit, :update, :destroy] do
|
||
| lib/redmine.rb | ||
|---|---|---|
|
map.permission :select_project_modules, {:projects => :modules}, :require => :member
|
||
|
map.permission :view_members, {:members => [:index, :show]}, :public => true, :read => true
|
||
|
map.permission :manage_members, {:projects => :settings, :members => [:index, :show, :new, :create, :edit, :update, :destroy, :autocomplete]}, :require => :member
|
||
|
map.permission :manage_versions, {:projects => :settings, :versions => [:new, :create, :edit, :update, :close_completed, :destroy]}, :require => :member
|
||
|
map.permission :manage_versions, {:projects => :settings, :versions => [:new, :create, :edit, :update, :close_completed, :destroy, :bulk_update]}, :require => :member
|
||
|
map.permission :add_subprojects, {:projects => [:new, :create]}, :require => :member
|
||
|
# Queries
|
||
|
map.permission :manage_public_queries, {:queries => [:new, :create, :edit, :update, :destroy]}, :require => :member
|
||
| test/functional/context_menus_controller_test.rb | ||
|---|---|---|
|
assert_select 'a.disabled', :text => 'Edit'
|
||
|
end
|
||
|
def test_context_menu_one_version_should_link_to_version_path
|
||
|
@request.session[:user_id] = 2
|
||
|
get(
|
||
|
:versions,
|
||
|
:params => {
|
||
|
:ids => [2]
|
||
|
}
|
||
|
)
|
||
|
assert_response :success
|
||
|
assert_select 'a.icon-edit[href=?]', '/versions/2/edit', :text => 'Edit'
|
||
|
assert_select 'a.icon-del[href=?]', '/versions?ids%5B%5D=2', :text => 'Delete'
|
||
|
# Statuses
|
||
|
assert_select 'a[href=?][data-method="patch"]', '/versions/2?ids%5B%5D=2&version%5Bstatus%5D=open', :text => 'open'
|
||
|
assert_select 'a.icon-checked.disabled[href=?]', '#', :text => 'locked'
|
||
|
assert_select 'a[href=?][data-method="patch"]', '/versions/2?ids%5B%5D=2&version%5Bstatus%5D=closed', :text => 'closed'
|
||
|
# Sharings
|
||
|
assert_select 'a.icon-checked.disabled[href=?]', '#', :text => 'Not shared'
|
||
|
assert_select 'a[href=?][data-method="patch"]', '/versions/2?ids%5B%5D=2&version%5Bsharing%5D=descendants', :text => 'With subprojects'
|
||
|
assert_select 'a[href=?][data-method="patch"]', '/versions/2?ids%5B%5D=2&version%5Bsharing%5D=hierarchy', :text => 'With project hierarchy'
|
||
|
assert_select 'a[href=?][data-method="patch"]', '/versions/2?ids%5B%5D=2&version%5Bsharing%5D=tree', :text => 'With project tree'
|
||
|
assert_select 'a[href=?][data-method="patch"]', '/versions/2?ids%5B%5D=2&version%5Bsharing%5D=system', :text => 'With all projects'
|
||
|
end
|
||
|
def test_context_menu_multiple_versions_should_link_to_bulk_update_versions_path
|
||
|
@request.session[:user_id] = 2
|
||
|
get(
|
||
|
:versions,
|
||
|
:params => {
|
||
|
:ids => [2, 3]
|
||
|
}
|
||
|
)
|
||
|
assert_response :success
|
||
|
assert_select 'a.icon-edit', :text => 'Edit', :count => 0
|
||
|
assert_select 'a.icon-del[href=?]', '/versions?ids%5B%5D=2&ids%5B%5D=3', :text => 'Delete'
|
||
|
# Statuses
|
||
|
assert_select 'a[href=?][data-method="patch"]', '/versions/bulk_update?ids%5B%5D=2&ids%5B%5D=3&version%5Bstatus%5D=open', :text => 'open'
|
||
|
assert_select 'a[href=?][data-method="patch"]', '/versions/bulk_update?ids%5B%5D=2&ids%5B%5D=3&version%5Bstatus%5D=locked', :text => 'locked'
|
||
|
assert_select 'a[href=?][data-method="patch"]', '/versions/bulk_update?ids%5B%5D=2&ids%5B%5D=3&version%5Bstatus%5D=closed', :text => 'closed'
|
||
|
# Sharings
|
||
|
assert_select 'a[href=?][data-method="patch"]', '/versions/bulk_update?ids%5B%5D=2&ids%5B%5D=3&version%5Bsharing%5D=none', :text => 'Not shared'
|
||
|
assert_select 'a[href=?][data-method="patch"]', '/versions/bulk_update?ids%5B%5D=2&ids%5B%5D=3&version%5Bsharing%5D=descendants', :text => 'With subprojects'
|
||
|
assert_select 'a[href=?][data-method="patch"]', '/versions/bulk_update?ids%5B%5D=2&ids%5B%5D=3&version%5Bsharing%5D=hierarchy', :text => 'With project hierarchy'
|
||
|
assert_select 'a[href=?][data-method="patch"]', '/versions/bulk_update?ids%5B%5D=2&ids%5B%5D=3&version%5Bsharing%5D=tree', :text => 'With project tree'
|
||
|
assert_select 'a[href=?][data-method="patch"]', '/versions/bulk_update?ids%5B%5D=2&ids%5B%5D=3&version%5Bsharing%5D=system', :text => 'With all projects'
|
||
|
end
|
||
|
end
|
||
| test/functional/projects_controller_test.rb | ||
|---|---|---|
|
end
|
||
|
end
|
||
|
def test_versions_in_settings_should_show_context_menu
|
||
|
@request.session[:user_id] = 2
|
||
|
get(
|
||
|
:settings,
|
||
|
:params => {
|
||
|
:id => 'ecookbook',
|
||
|
:tab => 'versions',
|
||
|
:version_status => '',
|
||
|
:version_name => '.1',
|
||
|
}
|
||
|
)
|
||
|
assert_response :success
|
||
|
assert_select 'table.versions' do
|
||
|
assert_select 'thead' do
|
||
|
assert_select 'th.checkbox input[type=checkbox][name=?]', 'check_all', 1
|
||
|
end
|
||
|
assert_select 'tbody tr.hascontextmenu' do
|
||
|
assert_select 'td.checkbox input[type=checkbox][name=?]', 'ids[]', 1
|
||
|
assert_select 'td.name', :text => '0.1'
|
||
|
end
|
||
|
end
|
||
|
end
|
||
|
def test_versions_in_settings_with_version_shared_by_other_project_should_not_show_context_menu
|
||
|
@request.session[:user_id] = 2
|
||
|
get(
|
||
|
:settings,
|
||
|
:params => {
|
||
|
:id => 'ecookbook',
|
||
|
:tab => 'versions',
|
||
|
:version_status => '',
|
||
|
:version_name => 'subproject',
|
||
|
}
|
||
|
)
|
||
|
assert_response :success
|
||
|
assert_select 'table.versions' do
|
||
|
assert_select 'thead' do
|
||
|
assert_select 'th.checkbox input[type=checkbox][name=?]', 'check_all', 0
|
||
|
end
|
||
|
assert_select 'tbody tr.shared' do
|
||
|
assert_select 'td.checkbox input[type=checkbox][name=?]', 'ids[]', 0
|
||
|
assert_select 'td.name', :text => 'Private child of eCookbook - Private Version of public subproject'
|
||
|
end
|
||
|
end
|
||
|
end
|
||
|
def test_settings_should_show_locked_members
|
||
|
user = User.generate!
|
||
|
member = User.add_to_project(user, Project.find(1))
|
||
| test/functional/versions_controller_test.rb | ||
|---|---|---|
|
assert_include 'Assigned', response.body
|
||
|
assert_include 'Closed', response.body
|
||
|
end
|
||
|
def test_bulk_update_on_status
|
||
|
ids = [2, 3]
|
||
|
update_attr = {:status => 'closed'}
|
||
|
assert_equal 2, Version.where(:id => ids).where.not(update_attr).count
|
||
|
@request.session[:user_id] = 2
|
||
|
patch :bulk_update, :params => {
|
||
|
:ids => ids,
|
||
|
:version => update_attr
|
||
|
}
|
||
|
assert_redirected_to :controller => :projects, :action => :settings,
|
||
|
:tab => :versions, :id => :ecookbook
|
||
|
assert_equal 'Successful update.', flash[:notice]
|
||
|
assert_equal 2, Version.where(:id => ids).where(update_attr).count
|
||
|
end
|
||
|
def test_bulk_update_on_sharing
|
||
|
ids = [2, 3]
|
||
|
update_attr = {:sharing => 'descendants'}
|
||
|
assert_equal 2, Version.where(:id => ids).where.not(update_attr).count
|
||
|
@request.session[:user_id] = 2
|
||
|
patch :bulk_update, :params => {
|
||
|
:ids => ids,
|
||
|
:version => update_attr
|
||
|
}
|
||
|
assert_redirected_to :controller => :projects, :action => :settings,
|
||
|
:tab => :versions, :id => :ecookbook
|
||
|
assert_equal 'Successful update.', flash[:notice]
|
||
|
assert_equal 2, Version.where(:id => ids).where(update_attr).count
|
||
|
end
|
||
|
def test_bulk_update_with_validation_failure
|
||
|
ids = [2, 3]
|
||
|
versions = Version.where(:id => ids).reorder(:id => :asc)
|
||
|
assert_equal 2, versions.count
|
||
|
@request.session[:user_id] = 2
|
||
|
patch :bulk_update, :params => {
|
||
|
:ids => ids,
|
||
|
:version => {
|
||
|
:status => 'invalid'
|
||
|
}
|
||
|
}
|
||
|
assert_redirected_to :controller => :projects, :action => :settings,
|
||
|
:tab => :versions, :id => :ecookbook
|
||
|
assert_equal 'Status is not included in the list', flash[:error]
|
||
|
assert_equal versions, Version.where(:id => ids).reorder(:id => :asc)
|
||
|
end
|
||
|
def test_bulk_destroy
|
||
|
Issue.update(:fixed_version_id => nil)
|
||
|
@request.session[:user_id] = 2
|
||
|
assert_difference 'Version.count', -2 do
|
||
|
delete :destroy, :params => {:ids => [2, 3]}
|
||
|
end
|
||
|
assert_redirected_to :controller => :projects, :action => :settings,
|
||
|
:tab => :versions, :id => :ecookbook
|
||
|
assert_equal 'Successful deletion.', flash[:notice]
|
||
|
end
|
||
|
def test_bulk_destroy_with_version_in_use_should_fail
|
||
|
@request.session[:user_id] = 2
|
||
|
assert_no_difference 'Version.count' do
|
||
|
delete :destroy, :params => {:ids => [2, 3]}
|
||
|
end
|
||
|
assert_redirected_to :controller => :projects, :action => :settings,
|
||
|
:tab => :versions, :id => :ecookbook
|
||
|
assert_equal 'Unable to delete version.', flash[:error]
|
||
|
end
|
||
|
end
|
||
| test/helpers/routes_helper_test.rb | ||
|---|---|---|
|
require File.expand_path('../../test_helper', __FILE__)
|
||
|
class RoutesHelperTest < Redmine::HelperTest
|
||
|
fixtures :projects, :issues
|
||
|
fixtures :projects, :issues, :versions
|
||
|
include Rails.application.routes.url_helpers
|
||
| ... | ... | |
|
assert_equal 'http://test.host/projects/ecookbook/issues?set_filter=1', _project_issues_url(Project.find(1), set_filter: 1)
|
||
|
assert_equal 'http://test.host/issues?set_filter=1', _project_issues_url(nil, set_filter: 1)
|
||
|
end
|
||
|
def test_bulk_update_versions_path
|
||
|
assert_equal '/versions/bulk_update', _bulk_update_versions_path(nil, nil)
|
||
|
assert_equal '/versions/1', _bulk_update_versions_path(Version.find(1), nil)
|
||
|
end
|
||
|
end
|
||
| test/integration/routing/context_menus_test.rb | ||
|---|---|---|
|
should_route 'GET /issues/context_menu' => 'context_menus#issues'
|
||
|
should_route 'POST /issues/context_menu' => 'context_menus#issues'
|
||
|
end
|
||
|
def test_context_menus_versions
|
||
|
should_route 'GET /versions/context_menu' => 'context_menus#versions'
|
||
|
should_route 'POST /versions/context_menu' => 'context_menus#versions'
|
||
|
end
|
||
|
end
|
||
| test/integration/routing/versions_test.rb | ||
|---|---|---|
|
should_route 'POST /versions/1/status_by' => 'versions#status_by', :id => '1'
|
||
|
end
|
||
|
def test_versions_bulk_edit
|
||
|
should_route 'PATCH /versions/bulk_update' => 'versions#bulk_update'
|
||
|
should_route 'DELETE /versions' => 'versions#destroy'
|
||
|
end
|
||
|
end
|
||
- « Previous
- 1
- 2
- Next »