Class: OauthClientsControllerDestroyTest
- Inherits:
-
ActionController::TestCase
- Object
- ActionController::TestCase
- OauthClientsControllerDestroyTest
- Includes:
- OAuthControllerTestHelper
- Defined in:
- lib/generators/test_unit/templates/clients_controller_test.rb
Instance Method Summary (collapse)
- - (Object) do_delete
- - (Object) setup
- - (Object) test_should_destroy_client_applications
- - (Object) test_should_query_current_users_client_applications
- - (Object) test_should_redirect_to_list
Instance Method Details
- (Object) do_delete
215 216 217 |
# File 'lib/generators/test_unit/templates/clients_controller_test.rb', line 215 def do_delete delete :destroy,:id=>'3' end |
- (Object) setup
206 207 208 209 210 211 212 213 |
# File 'lib/generators/test_unit/templates/clients_controller_test.rb', line 206 def setup @controller = OauthClientsController.new @request = ActionController::TestRequest.new @response = ActionController::TestResponse.new login_as_application_owner @client_application.stubs(:destroy) end |
- (Object) test_should_destroy_client_applications
225 226 227 228 |
# File 'lib/generators/test_unit/templates/clients_controller_test.rb', line 225 def test_should_destroy_client_applications @client_application.expects(:destroy) do_delete end |
- (Object) test_should_query_current_users_client_applications
219 220 221 222 223 |
# File 'lib/generators/test_unit/templates/clients_controller_test.rb', line 219 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_delete end |
- (Object) test_should_redirect_to_list
230 231 232 233 234 |
# File 'lib/generators/test_unit/templates/clients_controller_test.rb', line 230 def test_should_redirect_to_list do_delete assert_response :redirect assert_redirected_to :action => 'index' end |