Class: OauthClientsControllerNewTest
- Inherits:
-
ActionController::TestCase
- Object
- ActionController::TestCase
- OauthClientsControllerNewTest
- Includes:
- OAuthControllerTestHelper
- Defined in:
- lib/generators/test_unit/templates/clients_controller_test.rb
Instance Method Summary collapse
- #do_get ⇒ Object
- #setup ⇒ Object
- #test_should_assign_client_applications ⇒ Object
- #test_should_be_successful ⇒ Object
- #test_should_render_show_template ⇒ Object
Instance Method Details
#do_get ⇒ Object
96 97 98 |
# File 'lib/generators/test_unit/templates/clients_controller_test.rb', line 96 def do_get get :new end |
#setup ⇒ Object
87 88 89 90 91 92 93 94 |
# File 'lib/generators/test_unit/templates/clients_controller_test.rb', line 87 def setup @controller = OauthClientsController.new @request = ActionController::TestRequest.new @response = ActionController::TestResponse.new login_as_application_owner ClientApplication.stubs(:new).returns(@client_application) end |
#test_should_assign_client_applications ⇒ Object
105 106 107 108 |
# File 'lib/generators/test_unit/templates/clients_controller_test.rb', line 105 def test_should_assign_client_applications do_get assert_equal @client_application, assigns(:client_application) end |
#test_should_be_successful ⇒ Object
100 101 102 103 |
# File 'lib/generators/test_unit/templates/clients_controller_test.rb', line 100 def test_should_be_successful do_get assert @response.success? end |
#test_should_render_show_template ⇒ Object
110 111 112 113 |
# File 'lib/generators/test_unit/templates/clients_controller_test.rb', line 110 def test_should_render_show_template do_get assert_template 'new' end |