Skip to content

Commit

Permalink
Rename sent_to_esfa claim status to payment_in_progress
Browse files Browse the repository at this point in the history
  • Loading branch information
Nitemaeric committed Oct 10, 2024
1 parent e163e01 commit 9946691
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 9 deletions.
2 changes: 1 addition & 1 deletion app/components/claim/status_tag_component.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def status_colours
internal_draft: "grey",
draft: "grey",
submitted: "blue",
sent_to_esfa: "light-blue",
payment_in_progress: "light-blue",
}.with_indifferent_access
end
end
2 changes: 1 addition & 1 deletion app/models/claims/claim.rb
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ class Claims::Claim < ApplicationRecord
internal_draft: "internal_draft",
draft: "draft",
submitted: "submitted",
sent_to_esfa: "sent_to_esfa",
payment_in_progress: "payment_in_progress",
},
validate: true

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
class RenameSentToESFAClaimStatusToPaymentInProgress < ActiveRecord::Migration[7.2]
def change
rename_enum_value :claim_status, from: "sent_to_esfa", to: "payment_in_progress"
end
end
4 changes: 2 additions & 2 deletions db/schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@
#
# It's strongly recommended that you check this file into your version control system.

ActiveRecord::Schema[7.2].define(version: 2024_09_27_160048) do
ActiveRecord::Schema[7.2].define(version: 2024_10_09_164610) do
# These are extensions that must be enabled in order to support this database
enable_extension "pg_trgm"
enable_extension "plpgsql"

# Custom types defined in this database.
# Note that some types may not work with other database engines. Be careful if changing database.
create_enum "claim_status", ["internal_draft", "draft", "submitted", "sent_to_esfa"]
create_enum "claim_status", ["internal_draft", "draft", "submitted", "payment_in_progress"]
create_enum "mentor_training_type", ["refresher", "initial"]
create_enum "placement_status", ["draft", "published"]
create_enum "placement_year_group", ["year_1", "year_2", "year_3", "year_4", "year_5", "year_6"]
Expand Down
6 changes: 3 additions & 3 deletions spec/components/claim/status_tag_component_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@
end
end

context "when the claim's status is 'sent_to_esfa'" do
let(:claim) { build(:claim, status: :sent_to_esfa) }
context "when the claim's status is 'payment_in_progress'" do
let(:claim) { build(:claim, status: :payment_in_progress) }

it "renders a light blue tag" do
expect(page).to have_css(".govuk-tag--light-blue", text: "Sent to ESFA")
expect(page).to have_css(".govuk-tag--light-blue", text: "Payment in progress")
end
end

Expand Down
2 changes: 1 addition & 1 deletion spec/helpers/claims/claim_helper_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
RSpec.describe Claims::ClaimHelper do
describe "#claim_statuses_for_selection" do
it "returns an array of claims statuses, except draft statuses" do
expect(claim_statuses_for_selection).to contain_exactly("submitted", "sent_to_esfa")
expect(claim_statuses_for_selection).to contain_exactly("submitted", "payment_in_progress")
end
end
end
2 changes: 1 addition & 1 deletion spec/models/claims/claim_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@
internal_draft: "internal_draft",
draft: "draft",
submitted: "submitted",
sent_to_esfa: "sent_to_esfa",
payment_in_progress: "payment_in_progress",
)
.backed_by_column_of_type(:enum)
end
Expand Down

0 comments on commit 9946691

Please sign in to comment.