Class: OauthClientsControllerShowTest
- Inherits:
-
ActionController::TestCase
- Object
- ActionController::TestCase
- OauthClientsControllerShowTest
- 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_show_template ⇒ Object
Instance Method Details
#do_get ⇒ Object
56 57 58 |
# File 'lib/generators/test_unit/templates/clients_controller_test.rb', line 56 def do_get get :show, :id=>'3' end |
#setup ⇒ Object
48 49 50 51 52 53 54 |
# File 'lib/generators/test_unit/templates/clients_controller_test.rb', line 48 def setup @controller = OauthClientsController.new @request = ActionController::TestRequest.new @response = ActionController::TestResponse.new login_as_application_owner end |
#test_should_assign_client_applications ⇒ Object
71 72 73 74 |
# File 'lib/generators/test_unit/templates/clients_controller_test.rb', line 71 def test_should_assign_client_applications do_get assert_equal @client_application, assigns(:client_application) end |
#test_should_be_successful ⇒ Object
60 61 62 63 |
# File 'lib/generators/test_unit/templates/clients_controller_test.rb', line 60 def test_should_be_successful do_get assert @response.success? end |
#test_should_query_current_users_client_applications ⇒ Object
65 66 67 68 69 |
# File 'lib/generators/test_unit/templates/clients_controller_test.rb', line 65 def test_should_query_current_users_client_applications @user.expects(:client_applications).returns(@client_applications) @client_applications.expects(:find).with('3').returns(@client_application) do_get end |
#test_should_render_show_template ⇒ Object
76 77 78 79 |
# File 'lib/generators/test_unit/templates/clients_controller_test.rb', line 76 def test_should_render_show_template do_get assert_template 'show' end |