DEV: Fix broken RunProblemCheck spec (#26074)

The build is broken due to some changes not being staged when I pushed the previous PR. The assertions that check that a job has been scheduled needs to be updated to reflect the new name.
This commit is contained in:
Ted Johansson 2024-03-07 16:31:59 +11:00 committed by GitHub
parent 6e95c152ed
commit b36256f222
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 8 additions and 5 deletions

View File

@ -90,7 +90,7 @@ RSpec.describe Jobs::RunProblemCheck do
it "schedules a retry" do it "schedules a retry" do
expect_enqueued_with( expect_enqueued_with(
job: :problem_check, job: :run_problem_check,
args: { args: {
check_identifier: :test_check, check_identifier: :test_check,
retry_count: 1, retry_count: 1,
@ -119,7 +119,7 @@ RSpec.describe Jobs::RunProblemCheck do
end end
it "does not schedule a retry" do it "does not schedule a retry" do
expect_not_enqueued_with(job: :problem_check) do expect_not_enqueued_with(job: :run_problem_check) do
described_class.new.execute(check_identifier: :test_check, retry_count: 1) described_class.new.execute(check_identifier: :test_check, retry_count: 1)
end end
end end

View File

@ -26,9 +26,12 @@ RSpec.describe Jobs::RunProblemChecks do
end end
it "schedules the individual scheduled checks" do it "schedules the individual scheduled checks" do
expect_enqueued_with(job: :problem_check, args: { check_identifier: "scheduled_check" }) do expect_enqueued_with(
described_class.new.execute([]) job: :run_problem_check,
end args: {
check_identifier: "scheduled_check",
},
) { described_class.new.execute([]) }
end end
end end