Instiki 0.17.2: Security Release
This release upgrades Instiki to Rails 2.3.4, which patches two security holes in Rails. See http://weblog.rubyonrails.org/2009/9/4/ruby-on-rails-2-3-4 There are also some new features, and the usual boatload of bugfixes. See the CHANGELOG for details.
This commit is contained in:
parent
34c4306867
commit
4bdf703ab2
211 changed files with 3959 additions and 1325 deletions
|
@ -76,6 +76,50 @@ class ResourcesTest < ActionController::TestCase
|
|||
end
|
||||
end
|
||||
|
||||
def test_override_paths_for_member_and_collection_methods
|
||||
collection_methods = { 'rss' => :get, 'reorder' => :post, 'csv' => :post }
|
||||
member_methods = { 'rss' => :get, :atom => :get, :upload => :post, :fix => :post }
|
||||
path_names = {:new => 'nuevo', 'rss' => 'canal', :fix => 'corrigir' }
|
||||
|
||||
with_restful_routing :messages,
|
||||
:collection => collection_methods,
|
||||
:member => member_methods,
|
||||
:path_names => path_names do
|
||||
|
||||
assert_restful_routes_for :messages,
|
||||
:collection => collection_methods,
|
||||
:member => member_methods,
|
||||
:path_names => path_names do |options|
|
||||
member_methods.each do |action, method|
|
||||
assert_recognizes(options.merge(:action => action.to_s, :id => '1'),
|
||||
:path => "/messages/1/#{path_names[action] || action}",
|
||||
:method => method)
|
||||
end
|
||||
|
||||
collection_methods.each do |action, method|
|
||||
assert_recognizes(options.merge(:action => action),
|
||||
:path => "/messages/#{path_names[action] || action}",
|
||||
:method => method)
|
||||
end
|
||||
end
|
||||
|
||||
assert_restful_named_routes_for :messages,
|
||||
:collection => collection_methods,
|
||||
:member => member_methods,
|
||||
:path_names => path_names do |options|
|
||||
|
||||
collection_methods.keys.each do |action|
|
||||
assert_named_route "/messages/#{path_names[action] || action}", "#{action}_messages_path", :action => action
|
||||
end
|
||||
|
||||
member_methods.keys.each do |action|
|
||||
assert_named_route "/messages/1/#{path_names[action] || action}", "#{action}_message_path", :action => action, :id => "1"
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def test_override_paths_for_default_restful_actions
|
||||
resource = ActionController::Resources::Resource.new(:messages,
|
||||
:path_names => {:new => 'nuevo', :edit => 'editar'})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue