From 68d2926ab09d49086eb4101c53d8ae604bd4b334 Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Fri, 22 Dec 2006 03:16:50 +0000 Subject: Singleton resources: POST /singleton => create, GET /singleton/new => new git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5772 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- actionpack/test/controller/resources_test.rb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'actionpack/test') diff --git a/actionpack/test/controller/resources_test.rb b/actionpack/test/controller/resources_test.rb index ea3f4288f2..be0d6d1814 100644 --- a/actionpack/test/controller/resources_test.rb +++ b/actionpack/test/controller/resources_test.rb @@ -350,8 +350,11 @@ class ResourcesTest < Test::Unit::TestCase with_options options[:options] do |controller| controller.assert_routing full_path, :action => 'show' controller.assert_routing "#{full_path}.xml", :action => 'show', :format => 'xml' + controller.assert_routing "#{full_path}/new", :action => 'new' + controller.assert_routing "#{full_path};edit", :action => 'edit' end + assert_recognizes(options[:options].merge(:action => 'create'), :path => full_path, :method => :post) assert_recognizes(options[:options].merge(:action => 'update'), :path => full_path, :method => :put) assert_recognizes(options[:options].merge(:action => 'destroy'), :path => full_path, :method => :delete) @@ -370,6 +373,8 @@ class ResourcesTest < Test::Unit::TestCase assert_named_route "#{full_path}", "#{singleton_name}_path", options[:options] assert_named_route "#{full_path}.xml", "formatted_#{singleton_name}_path", options[:options].merge(:format => 'xml') + assert_named_route "#{full_path}/new", "new_#{singleton_name}_path", options[:options] + assert_named_route "#{full_path};edit", "edit_#{singleton_name}_path", options[:options] end def assert_named_route(expected, route, options) -- cgit v1.2.3