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
55 56 57 |
# File 'lib/spree/testing_support/controller_requests.rb', line 55 def spree_delete(action, parameters = nil, session = nil, flash = nil) process_spree_action(action, parameters, session, flash, 'DELETE') end |
#spree_get(action, parameters = nil, session = nil, flash = nil) ⇒ Object
35 36 37 |
# File 'lib/spree/testing_support/controller_requests.rb', line 35 def spree_get(action, parameters = nil, session = nil, flash = nil) 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
50 51 52 |
# File 'lib/spree/testing_support/controller_requests.rb', line 50 def spree_patch(action, parameters = nil, session = nil, flash = nil) 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
40 41 42 |
# File 'lib/spree/testing_support/controller_requests.rb', line 40 def spree_post(action, parameters = nil, session = nil, flash = nil) 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
45 46 47 |
# File 'lib/spree/testing_support/controller_requests.rb', line 45 def spree_put(action, parameters = nil, session = nil, flash = nil) process_spree_action(action, parameters, session, flash, 'PUT') end |
#spree_xhr_delete(action, parameters = nil, session = nil, flash = nil) ⇒ Object
75 76 77 |
# File 'lib/spree/testing_support/controller_requests.rb', line 75 def spree_xhr_delete(action, parameters = nil, session = nil, flash = nil) process_spree_xhr_action(action, parameters, session, flash, :delete) end |
#spree_xhr_get(action, parameters = nil, session = nil, flash = nil) ⇒ Object
59 60 61 |
# File 'lib/spree/testing_support/controller_requests.rb', line 59 def spree_xhr_get(action, parameters = nil, session = nil, flash = nil) process_spree_xhr_action(action, parameters, session, flash, :get) end |
#spree_xhr_patch(action, parameters = nil, session = nil, flash = nil) ⇒ Object
71 72 73 |
# File 'lib/spree/testing_support/controller_requests.rb', line 71 def spree_xhr_patch(action, parameters = nil, session = nil, flash = nil) process_spree_xhr_action(action, parameters, session, flash, :patch) end |
#spree_xhr_post(action, parameters = nil, session = nil, flash = nil) ⇒ Object
63 64 65 |
# File 'lib/spree/testing_support/controller_requests.rb', line 63 def spree_xhr_post(action, parameters = nil, session = nil, flash = nil) process_spree_xhr_action(action, parameters, session, flash, :post) end |
#spree_xhr_put(action, parameters = nil, session = nil, flash = nil) ⇒ Object
67 68 69 |
# File 'lib/spree/testing_support/controller_requests.rb', line 67 def spree_xhr_put(action, parameters = nil, session = nil, flash = nil) process_spree_xhr_action(action, parameters, session, flash, :put) end |