mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-24 03:00:12 +01:00
Use the keyword args syntax for controller actions
Co-Authored-By: Dan Rice <dnrce@users.noreply.github.com>
This commit is contained in:
parent
755a7a1b80
commit
2f85a42f91
19 changed files with 258 additions and 241 deletions
|
|
@ -69,7 +69,7 @@ class ActionController::TestCase
|
|||
end
|
||||
|
||||
def ajax_create(name)
|
||||
xhr :post, :create, get_model_class.downcase => {:name => name}
|
||||
post :create, xhr: true, params: { get_model_class.downcase => {:name => name} }
|
||||
end
|
||||
|
||||
def assert_number_of_items_in_rss_feed(expected)
|
||||
|
|
@ -110,7 +110,7 @@ end
|
|||
class ActionDispatch::IntegrationTest
|
||||
|
||||
def authenticated_post_xml(url, username, password, parameters, headers = {})
|
||||
post url, parameters,
|
||||
post url, params: parameters, headers:
|
||||
{ 'HTTP_AUTHORIZATION' => "Basic " + Base64.encode64("#{username}:#{password}"),
|
||||
'ACCEPT' => 'application/xml',
|
||||
'CONTENT_TYPE' => 'application/xml'
|
||||
|
|
@ -118,7 +118,7 @@ class ActionDispatch::IntegrationTest
|
|||
end
|
||||
|
||||
def authenticated_get_xml(url, username, password, parameters, headers = {})
|
||||
get url, parameters,
|
||||
get url, params: parameters, headers:
|
||||
{ 'HTTP_AUTHORIZATION' => "Basic " + Base64.encode64("#{username}:#{password}"),
|
||||
'ACCEPT' => 'application/xml',
|
||||
'CONTENT_TYPE' => 'application/xml'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue