mirror of https://github.com/rails/rails
fix typo of using where instead of were
This commit is contained in:
parent
30653cc8d1
commit
13b3c46365
|
@ -423,9 +423,9 @@ module ActiveJob
|
||||||
|
|
||||||
message = +"No enqueued job found with #{expected}"
|
message = +"No enqueued job found with #{expected}"
|
||||||
if potential_matches.empty?
|
if potential_matches.empty?
|
||||||
message << "\n\nNo jobs where enqueued"
|
message << "\n\nNo jobs were enqueued"
|
||||||
elsif matching_class.empty?
|
elsif matching_class.empty?
|
||||||
message << "\n\nNo jobs of class #{expected[:job]} where enqueued, job classes enqueued: "
|
message << "\n\nNo jobs of class #{expected[:job]} were enqueued, job classes enqueued: "
|
||||||
message << potential_matches.map { |job| job["job_class"] }.join(", ")
|
message << potential_matches.map { |job| job["job_class"] }.join(", ")
|
||||||
else
|
else
|
||||||
message << "\n\nPotential matches: #{matching_class.join("\n")}"
|
message << "\n\nPotential matches: #{matching_class.join("\n")}"
|
||||||
|
@ -525,9 +525,9 @@ module ActiveJob
|
||||||
|
|
||||||
message = +"No performed job found with #{expected}"
|
message = +"No performed job found with #{expected}"
|
||||||
if potential_matches.empty?
|
if potential_matches.empty?
|
||||||
message << "\n\nNo jobs where performed"
|
message << "\n\nNo jobs were performed"
|
||||||
elsif matching_class.empty?
|
elsif matching_class.empty?
|
||||||
message << "\n\nNo jobs of class #{expected[:job]} where performed, job classes performed: "
|
message << "\n\nNo jobs of class #{expected[:job]} were performed, job classes performed: "
|
||||||
message << potential_matches.map { |job| job["job_class"] }.join(", ")
|
message << potential_matches.map { |job| job["job_class"] }.join(", ")
|
||||||
else
|
else
|
||||||
message << "\n\nPotential matches: #{matching_class.join("\n")}"
|
message << "\n\nPotential matches: #{matching_class.join("\n")}"
|
||||||
|
|
|
@ -714,7 +714,7 @@ class EnqueuedJobsTest < ActiveJob::TestCase
|
||||||
end
|
end
|
||||||
|
|
||||||
assert_match(/No enqueued job found with {:job=>MultipleKwargsJob, :args=>\[#{wilma.inspect}\]}/, error.message)
|
assert_match(/No enqueued job found with {:job=>MultipleKwargsJob, :args=>\[#{wilma.inspect}\]}/, error.message)
|
||||||
assert_match(/No jobs of class MultipleKwargsJob where enqueued, job classes enqueued: HelloJob/, error.message)
|
assert_match(/No jobs of class MultipleKwargsJob were enqueued, job classes enqueued: HelloJob/, error.message)
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_shows_no_jobs_enqueued_when_there_are_no_jobs
|
def test_shows_no_jobs_enqueued_when_there_are_no_jobs
|
||||||
|
@ -724,7 +724,7 @@ class EnqueuedJobsTest < ActiveJob::TestCase
|
||||||
end
|
end
|
||||||
|
|
||||||
assert_match(/No enqueued job found with {:job=>HelloJob, :args=>\[\]}/, error.message)
|
assert_match(/No enqueued job found with {:job=>HelloJob, :args=>\[\]}/, error.message)
|
||||||
assert_match(/No jobs where enqueued/, error.message)
|
assert_match(/No jobs were enqueued/, error.message)
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_assert_enqueued_with_failure_with_no_block_with_global_id_args
|
def test_assert_enqueued_with_failure_with_no_block_with_global_id_args
|
||||||
|
@ -1985,7 +1985,7 @@ class PerformedJobsTest < ActiveJob::TestCase
|
||||||
end
|
end
|
||||||
|
|
||||||
assert_match(/No performed job found with {:job=>HelloJob, :args=>\[\]}/, error.message)
|
assert_match(/No performed job found with {:job=>HelloJob, :args=>\[\]}/, error.message)
|
||||||
assert_match(/No jobs where performed/, error.message)
|
assert_match(/No jobs were performed/, error.message)
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_assert_performed_when_not_matching_the_class_shows_alteratives
|
def test_assert_performed_when_not_matching_the_class_shows_alteratives
|
||||||
|
@ -1998,7 +1998,7 @@ class PerformedJobsTest < ActiveJob::TestCase
|
||||||
end
|
end
|
||||||
|
|
||||||
assert_match(/No performed job found with {:job=>MultipleKwargsJob, :args=>\[#<Person.* @id=11>\]}/, error.message)
|
assert_match(/No performed job found with {:job=>MultipleKwargsJob, :args=>\[#<Person.* @id=11>\]}/, error.message)
|
||||||
assert_match(/No jobs of class MultipleKwargsJob where performed, job classes performed: HelloJob/, error.message)
|
assert_match(/No jobs of class MultipleKwargsJob were performed, job classes performed: HelloJob/, error.message)
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_assert_performed_with_does_not_change_jobs_count
|
def test_assert_performed_with_does_not_change_jobs_count
|
||||||
|
|
Loading…
Reference in New Issue