Module: Spree::TestingSupport::ControllerRequests
- Extended by:
- ActiveSupport::Concern
- Defined in:
- lib/spree/testing_support/controller_requests.rb
Instance Method Summary collapse
-
#spree_delete(action, parameters = nil, session = nil, flash = nil) ⇒ Object
Executes a request simulating DELETE HTTP method and set/volley the response.
- #spree_get(action, parameters = nil, session = nil, flash = nil) ⇒ Object
-
#spree_patch(action, parameters = nil, session = nil, flash = nil) ⇒ Object
# Executes a request simulating PATCH HTTP method and set/volley the response.
-
#spree_post(action, parameters = nil, session = nil, flash = nil) ⇒ Object
Executes a request simulating POST HTTP method and set/volley the response.
-
#spree_put(action, parameters = nil, session = nil, flash = nil) ⇒ Object
Executes a request simulating PUT HTTP method and set/volley the response.
- #spree_xhr_delete(action, parameters = nil, session = nil, flash = nil) ⇒ Object
- #spree_xhr_get(action, parameters = nil, session = nil, flash = nil) ⇒ Object
- #spree_xhr_patch(action, parameters = nil, session = nil, flash = nil) ⇒ Object
- #spree_xhr_post(action, parameters = nil, session = nil, flash = nil) ⇒ Object
- #spree_xhr_put(action, parameters = nil, session = nil, flash = nil) ⇒ Object
Instance Method Details
#spree_delete(action, parameters = nil, session = nil, flash = nil) ⇒ Object
Executes a request simulating DELETE HTTP method and set/volley the response
46 47 48 49 50 51 52 |
# File 'lib/spree/testing_support/controller_requests.rb', line 46 def spree_delete(action, parameters = nil, session = nil, flash = nil) ActiveSupport::Deprecation.warn(<<-DEPRECATION, caller) ControllerRequests#spree_delete is deprecated and will be removed in Spree 5.0. Please use delete, params: {} DEPRECATION process_spree_action(action, parameters, session, flash, 'DELETE') end |
#spree_get(action, parameters = nil, session = nil, flash = nil) ⇒ Object
10 11 12 13 14 15 16 |
# File 'lib/spree/testing_support/controller_requests.rb', line 10 def spree_get(action, parameters = nil, session = nil, flash = nil) ActiveSupport::Deprecation.warn(<<-DEPRECATION, caller) ControllerRequests#spree_get is deprecated and will be removed in Spree 5.0. Please use get, params: {} DEPRECATION process_spree_action(action, parameters, session, flash, 'GET') end |
#spree_patch(action, parameters = nil, session = nil, flash = nil) ⇒ Object
# Executes a request simulating PATCH HTTP method and set/volley the response
37 38 39 40 41 42 43 |
# File 'lib/spree/testing_support/controller_requests.rb', line 37 def spree_patch(action, parameters = nil, session = nil, flash = nil) ActiveSupport::Deprecation.warn(<<-DEPRECATION, caller) ControllerRequests#spree_patch is deprecated and will be removed in Spree 5.0. Please use patch, params: {} DEPRECATION process_spree_action(action, parameters, session, flash, 'PATCH') end |
#spree_post(action, parameters = nil, session = nil, flash = nil) ⇒ Object
Executes a request simulating POST HTTP method and set/volley the response
19 20 21 22 23 24 25 |
# File 'lib/spree/testing_support/controller_requests.rb', line 19 def spree_post(action, parameters = nil, session = nil, flash = nil) ActiveSupport::Deprecation.warn(<<-DEPRECATION, caller) ControllerRequests#spree_post is deprecated and will be removed in Spree 5.0. Please use post, params: {} DEPRECATION process_spree_action(action, parameters, session, flash, 'POST') end |
#spree_put(action, parameters = nil, session = nil, flash = nil) ⇒ Object
Executes a request simulating PUT HTTP method and set/volley the response
28 29 30 31 32 33 34 |
# File 'lib/spree/testing_support/controller_requests.rb', line 28 def spree_put(action, parameters = nil, session = nil, flash = nil) ActiveSupport::Deprecation.warn(<<-DEPRECATION, caller) ControllerRequests#spree_put is deprecated and will be removed in Spree 5.0. Please use put, params: {} DEPRECATION process_spree_action(action, parameters, session, flash, 'PUT') end |
#spree_xhr_delete(action, parameters = nil, session = nil, flash = nil) ⇒ Object
82 83 84 85 86 87 |
# File 'lib/spree/testing_support/controller_requests.rb', line 82 def spree_xhr_delete(action, parameters = nil, session = nil, flash = nil) ActiveSupport::Deprecation.warn(<<-DEPRECATION, caller) ControllerRequests#spree_xhr_delete is deprecated and will be removed in Spree 5.0. DEPRECATION process_spree_xhr_action(action, parameters, session, flash, :delete) end |
#spree_xhr_get(action, parameters = nil, session = nil, flash = nil) ⇒ Object
54 55 56 57 58 59 |
# File 'lib/spree/testing_support/controller_requests.rb', line 54 def spree_xhr_get(action, parameters = nil, session = nil, flash = nil) ActiveSupport::Deprecation.warn(<<-DEPRECATION, caller) ControllerRequests#spree_xhr_get is deprecated and will be removed in Spree 5.0. DEPRECATION process_spree_xhr_action(action, parameters, session, flash, :get) end |
#spree_xhr_patch(action, parameters = nil, session = nil, flash = nil) ⇒ Object
75 76 77 78 79 80 |
# File 'lib/spree/testing_support/controller_requests.rb', line 75 def spree_xhr_patch(action, parameters = nil, session = nil, flash = nil) ActiveSupport::Deprecation.warn(<<-DEPRECATION, caller) ControllerRequests#spree_xhr_patch is deprecated and will be removed in Spree 5.0. DEPRECATION process_spree_xhr_action(action, parameters, session, flash, :patch) end |
#spree_xhr_post(action, parameters = nil, session = nil, flash = nil) ⇒ Object
61 62 63 64 65 66 |
# File 'lib/spree/testing_support/controller_requests.rb', line 61 def spree_xhr_post(action, parameters = nil, session = nil, flash = nil) ActiveSupport::Deprecation.warn(<<-DEPRECATION, caller) ControllerRequests#spree_xhr_post is deprecated and will be removed in Spree 5.0. DEPRECATION process_spree_xhr_action(action, parameters, session, flash, :post) end |
#spree_xhr_put(action, parameters = nil, session = nil, flash = nil) ⇒ Object
68 69 70 71 72 73 |
# File 'lib/spree/testing_support/controller_requests.rb', line 68 def spree_xhr_put(action, parameters = nil, session = nil, flash = nil) ActiveSupport::Deprecation.warn(<<-DEPRECATION, caller) ControllerRequests#spree_xhr_put is deprecated and will be removed in Spree 5.0. DEPRECATION process_spree_xhr_action(action, parameters, session, flash, :put) end |