StandardRB fixes
This commit is contained in:
@@ -37,7 +37,7 @@ class ApplicationJobTest < ActiveJob::TestCase
|
||||
end
|
||||
|
||||
assert_enqueued_jobs 1 do
|
||||
test_job.perform_later("arg1", "arg2", { "key" => "value" })
|
||||
test_job.perform_later("arg1", "arg2", {"key" => "value"})
|
||||
end
|
||||
|
||||
# ActiveJob serializes all hash keys as strings
|
||||
@@ -77,7 +77,7 @@ class ApplicationJobTest < ActiveJob::TestCase
|
||||
args = enqueued_jobs.last[:args]
|
||||
if args.is_a?(Array) && args.first.is_a?(Hash)
|
||||
# GlobalID serialization format
|
||||
assert_equal user.to_global_id.to_s, args.first['_aj_globalid']
|
||||
assert_equal user.to_global_id.to_s, args.first["_aj_globalid"]
|
||||
else
|
||||
# Direct object serialization
|
||||
assert_equal user.id, args.first.id
|
||||
@@ -90,4 +90,4 @@ class ApplicationJobTest < ActiveJob::TestCase
|
||||
assert_respond_to ApplicationJob, :retry_on
|
||||
assert_respond_to ApplicationJob, :discard_on
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -118,4 +118,4 @@ class InvitationsMailerTest < ActionMailer::TestCase
|
||||
assert_includes email.content_type, "multipart"
|
||||
assert email.html_part || email.text_part, "Should have html or text part"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -166,7 +166,7 @@ class PasswordsMailerTest < ActionMailer::TestCase
|
||||
|
||||
# Should not include sensitive data in headers (except Subject which legitimately mentions password)
|
||||
email.header.fields.each do |field|
|
||||
next if field.name =~ /^subject$/i
|
||||
next if /^subject$/i.match?(field.name)
|
||||
# Check for actual tokens (not just the word "token" which is common in emails)
|
||||
refute_includes field.value.to_s.downcase, "password"
|
||||
end
|
||||
@@ -197,4 +197,4 @@ class PasswordsMailerTest < ActionMailer::TestCase
|
||||
assert_equal [email_address], email.to
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user