diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2005-06-15 04:17:45 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2005-06-15 04:17:45 +0000 |
commit | cb79118111f7d4354b946dc9f2bed6a57dc81956 (patch) | |
tree | 4bcf1680f2d514076b86928a09ff72904e68e4f4 /actionpack/test | |
parent | ac1fa98bb90d551b472b33a24a92ca8e7723ba42 (diff) | |
download | rails-cb79118111f7d4354b946dc9f2bed6a57dc81956.tar.gz rails-cb79118111f7d4354b946dc9f2bed6a57dc81956.tar.bz2 rails-cb79118111f7d4354b946dc9f2bed6a57dc81956.zip |
Fixed double-singularization on scaffolded pagination call (Address would be turned into Addres) #1216, #1404 [nilsga]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1422 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/test')
-rw-r--r-- | actionpack/test/controller/addresses_render_test.rb | 45 | ||||
-rw-r--r-- | actionpack/test/fixtures/addresses/list.rhtml | 1 |
2 files changed, 46 insertions, 0 deletions
diff --git a/actionpack/test/controller/addresses_render_test.rb b/actionpack/test/controller/addresses_render_test.rb new file mode 100644 index 0000000000..a7b3e3a323 --- /dev/null +++ b/actionpack/test/controller/addresses_render_test.rb @@ -0,0 +1,45 @@ +require File.dirname(__FILE__) + '/../abstract_unit' + +class Address + + def Address.count(conditions = nil, join = nil) + nil + end + + def Address.find_all(arg1, arg2, arg3, arg4) + [] + end +end + +class AddressesTestController < ActionController::Base + + scaffold :address + + def self.controller_name; "addresses"; end + def self.controller_path; "addresses"; end + +end + +AddressesTestController.template_root = File.dirname(__FILE__) + "/../fixtures/" + +class AddressesTest < Test::Unit::TestCase + def setup + @controller = AddressesTestController.new + + # enable a logger so that (e.g.) the benchmarking stuff runs, so we can get + # a more accurate simulation of what happens in "real life". + @controller.logger = Logger.new(nil) + + @request = ActionController::TestRequest.new + @response = ActionController::TestResponse.new + + @request.host = "www.nextangle.com" + end + + def test_list + get :list + assert_equal "We only need to get this far!", @response.body.chomp + end + + +end diff --git a/actionpack/test/fixtures/addresses/list.rhtml b/actionpack/test/fixtures/addresses/list.rhtml new file mode 100644 index 0000000000..c75e01eece --- /dev/null +++ b/actionpack/test/fixtures/addresses/list.rhtml @@ -0,0 +1 @@ +We only need to get this far! |