Skip to content

Commit

Permalink
- added test case for issue:
Browse files Browse the repository at this point in the history
  rails#1951
  Namespaced model partial_path is wrong in namespaced controllers
  • Loading branch information
gramos committed Jul 24, 2011
1 parent a14f456 commit 7621d13
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions actionpack/test/controller/render_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 7621d13

Please sign in to comment.