tests: fix rails 2.7 keyword parameter deprecation warnings.
This commit is contained in:
@@ -127,7 +127,7 @@ class UsersControllerTest < ActionDispatch::IntegrationTest
|
||||
assert_redirected_to User.last
|
||||
assert_equal("xxx", User.last.name)
|
||||
assert_equal(User.last, User.last.authenticate_password("xxxxx1"))
|
||||
assert_equal(nil, User.last.email_address)
|
||||
assert_nil(User.last.email_address)
|
||||
assert_no_enqueued_emails
|
||||
end
|
||||
|
||||
|
||||
@@ -89,25 +89,25 @@ class ActionDispatch::IntegrationTest
|
||||
mock_post_version_service!
|
||||
mock_pool_version_service!
|
||||
|
||||
def method_authenticated(method_name, url, user, options)
|
||||
def method_authenticated(method_name, url, user, **options)
|
||||
post session_path, params: { name: user.name, password: user.password }
|
||||
self.send(method_name, url, options)
|
||||
send(method_name, url, **options)
|
||||
end
|
||||
|
||||
def get_auth(url, user, options = {})
|
||||
method_authenticated(:get, url, user, options)
|
||||
def get_auth(url, user, **options)
|
||||
method_authenticated(:get, url, user, **options)
|
||||
end
|
||||
|
||||
def post_auth(url, user, options = {})
|
||||
method_authenticated(:post, url, user, options)
|
||||
def post_auth(url, user, **options)
|
||||
method_authenticated(:post, url, user, **options)
|
||||
end
|
||||
|
||||
def put_auth(url, user, options = {})
|
||||
method_authenticated(:put, url, user, options)
|
||||
def put_auth(url, user, **options)
|
||||
method_authenticated(:put, url, user, **options)
|
||||
end
|
||||
|
||||
def delete_auth(url, user, options = {})
|
||||
method_authenticated(:delete, url, user, options)
|
||||
def delete_auth(url, user, **options)
|
||||
method_authenticated(:delete, url, user, **options)
|
||||
end
|
||||
|
||||
def setup
|
||||
|
||||
@@ -21,7 +21,7 @@ class PostDisapprovalTest < ActiveSupport::TestCase
|
||||
|
||||
should "not allow blank messages" do
|
||||
@post_disapproval = create(:post_disapproval, post: @post_1, message: "")
|
||||
assert_equal(nil, @post_disapproval.message)
|
||||
assert_nil(@post_disapproval.message)
|
||||
end
|
||||
|
||||
context "made by alice" do
|
||||
|
||||
Reference in New Issue
Block a user