diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2006-12-22 03:16:50 +0000 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2006-12-22 03:16:50 +0000 |
commit | 68d2926ab09d49086eb4101c53d8ae604bd4b334 (patch) | |
tree | 7cc5e4debdb46b4ec5578046a274a63a8bb8008b /actionpack/test/controller | |
parent | a1ca37ec8659800e5620630490ee8fa46bb3a217 (diff) | |
download | rails-68d2926ab09d49086eb4101c53d8ae604bd4b334.tar.gz rails-68d2926ab09d49086eb4101c53d8ae604bd4b334.tar.bz2 rails-68d2926ab09d49086eb4101c53d8ae604bd4b334.zip |
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
Diffstat (limited to 'actionpack/test/controller')
-rw-r--r-- | actionpack/test/controller/resources_test.rb | 5 |
1 files changed, 5 insertions, 0 deletions
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) |