aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGaston Ramos <ramos.gaston@gmail.com>2011-07-23 20:46:06 -0300
committerGaston Ramos <ramos.gaston@gmail.com>2011-07-24 00:54:45 -0300
commit7621d131d2b8f7b65f7f06615e6714d8f4605439 (patch)
tree63080b5a67f28e1f3e2e3a5c9ea2498062ec5028
parenta14f4566dd640b1a90e86872d82b83a2282459e6 (diff)
downloadrails-7621d131d2b8f7b65f7f06615e6714d8f4605439.tar.gz
rails-7621d131d2b8f7b65f7f06615e6714d8f4605439.tar.bz2
rails-7621d131d2b8f7b65f7f06615e6714d8f4605439.zip
- added test case for issue:
https://github.com/rails/rails/issues/1951 Namespaced model partial_path is wrong in namespaced controllers
-rw-r--r--actionpack/test/controller/render_test.rb14
1 files changed, 14 insertions, 0 deletions
diff --git a/actionpack/test/controller/render_test.rb b/actionpack/test/controller/render_test.rb
index be59da9105..99d6be7af3 100644
--- a/actionpack/test/controller/render_test.rb
+++ b/actionpack/test/controller/render_test.rb
@@ -14,6 +14,14 @@ module Fun
end
end
+module Quiz
+ class QuestionsController < ActionController::Base
+ def new
+ render :partial => Quiz::Question.new(:name => "Bruce Lee")
+ end
+ end
+end
+
class TestController < ActionController::Base
protect_from_forgery
@@ -1251,6 +1259,12 @@ class RenderTest < ActionController::TestCase
assert_template('fun/games/_form')
end
+ def test_namespaced_object_partial
+ @controller = Quiz::QuestionsController.new
+ get :new
+ assert_equal "Namespaced Partial", @response.body
+ end
+
def test_partial_collection
get :partial_collection
assert_equal "Hello: davidHello: mary", @response.body