Skip to content

Commit

Permalink
Improve test descriptions
Browse files Browse the repository at this point in the history
  • Loading branch information
Jamie authored and JamieCleare2525 committed Dec 13, 2024
1 parent 50432ea commit 6866abf
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
8 changes: 3 additions & 5 deletions app/wizards/claims/upload_sampling_data_wizard/upload_step.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,9 @@ def process_csv

CSV.parse(read_csv, headers: true) do |row|
claim = paid_claims.find_by(reference: row["claim_reference"])
if claim
claim_ids << claim.id
else
break
end
break if claim.blank?

claim_ids << claim.id
end

assign_csv_content
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
let(:claim_ids) { [current_year_paid_claim.id, another_paid_claim.id, current_year_draft_claim.id] }

describe "#perform" do
it "enqueues a Claims::Sampling::FlagForSamplingJob per" do
it "enqueues a Claims::Sampling::FlagForSamplingJob per claim ID" do
expect { described_class.perform_now(claim_ids) }.to have_enqueued_job(
Claims::Sampling::FlagForSamplingJob,
).exactly(:once)
Expand Down
2 changes: 1 addition & 1 deletion spec/jobs/claims/sampling/flag_for_sampling_job_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
let(:claim) { create(:claim, :submitted, :paid) }

describe "#perform" do
it "enqueues a Claims::Sampling::FlagForSamplingJob per" do
it "changes the status of the claim from 'paid' to 'sampling_in_progress'" do
expect { described_class.perform_now(claim) }.to change(claim, :status)
.from("paid").to("sampling_in_progress")
end
Expand Down

0 comments on commit 6866abf

Please sign in to comment.