Class: EditActionBaseTest
- Inherits:
-
ActionController::TestCase
- Object
- ActionController::TestCase
- EditActionBaseTest
- Includes:
- UserTestHelper
- Defined in:
- lib/vendor/plugins/inherited_resources/test/base_test.rb
Instance Method Summary collapse
Methods included from UserTestHelper
Instance Method Details
#test_controller_should_render_edit ⇒ Object
115 116 117 118 119 120 |
# File 'lib/vendor/plugins/inherited_resources/test/base_test.rb', line 115 def test_controller_should_render_edit User.stubs(:find).returns(mock_user) get :edit assert_response :success assert_equal 'Edit HTML', @response.body.strip end |
#test_expose_the_resquested_user ⇒ Object
108 109 110 111 112 113 |
# File 'lib/vendor/plugins/inherited_resources/test/base_test.rb', line 108 def test_expose_the_resquested_user User.expects(:find).with('42').returns(mock_user) get :edit, :id => '42' assert_response :success assert_equal mock_user, assigns(:user) end |