Class: OauthClientsControllerIndexTest
- Inherits:
-
ActionController::TestCase
- Object
- ActionController::TestCase
- OauthClientsControllerIndexTest
- 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_query_current_users_client_applications ⇒ Object
- #test_should_render_index_template ⇒ Object
Instance Method Details
#do_get ⇒ Object
19 20 21 |
# File 'lib/generators/test_unit/templates/clients_controller_test.rb', line 19 def do_get get :index end |
#setup ⇒ Object
11 12 13 14 15 16 17 |
# File 'lib/generators/test_unit/templates/clients_controller_test.rb', line 11 def setup @controller = OauthClientsController.new @request = ActionController::TestRequest.new @response = ActionController::TestResponse.new login_as_application_owner end |
#test_should_assign_client_applications ⇒ Object
33 34 35 36 |
# File 'lib/generators/test_unit/templates/clients_controller_test.rb', line 33 def test_should_assign_client_applications do_get assert_equal @client_applications, assigns(:client_applications) end |
#test_should_be_successful ⇒ Object
23 24 25 26 |
# File 'lib/generators/test_unit/templates/clients_controller_test.rb', line 23 def test_should_be_successful do_get assert @response.success? end |
#test_should_query_current_users_client_applications ⇒ Object
28 29 30 31 |
# File 'lib/generators/test_unit/templates/clients_controller_test.rb', line 28 def test_should_query_current_users_client_applications @user.expects(:client_applications).returns(@client_applications) do_get end |
#test_should_render_index_template ⇒ Object
38 39 40 41 |
# File 'lib/generators/test_unit/templates/clients_controller_test.rb', line 38 def test_should_render_index_template do_get assert_template 'index' end |