Permalink
Browse files

- added test case for issue:

  #1951
  Namespaced model partial_path is wrong in namespaced controllers
  • Loading branch information...
1 parent a14f456 commit 7621d131d2b8f7b65f7f06615e6714d8f4605439 @gramos gramos committed Jul 23, 2011
Showing with 14 additions and 0 deletions.
  1. +14 −0 actionpack/test/controller/render_test.rb
@@ -14,6 +14,14 @@ def nested_partial_with_form_builder
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 @@ def test_nested_partial_with_form_builder
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

0 comments on commit 7621d13

Please sign in to comment.