diff --git a/app/components/claim/status_tag_component.rb b/app/components/claim/status_tag_component.rb index a32ea4ac9..5d93841cf 100644 --- a/app/components/claim/status_tag_component.rb +++ b/app/components/claim/status_tag_component.rb @@ -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 diff --git a/app/models/claims/claim.rb b/app/models/claims/claim.rb index b65a48a9c..e2da0ade6 100644 --- a/app/models/claims/claim.rb +++ b/app/models/claims/claim.rb @@ -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 diff --git a/db/migrate/20241009164610_rename_sent_to_esfa_claim_status_to_payment_in_progress.rb b/db/migrate/20241009164610_rename_sent_to_esfa_claim_status_to_payment_in_progress.rb new file mode 100644 index 000000000..f35be701d --- /dev/null +++ b/db/migrate/20241009164610_rename_sent_to_esfa_claim_status_to_payment_in_progress.rb @@ -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 diff --git a/db/schema.rb b/db/schema.rb index 8de7d17cc..c3eb7d020 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -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"] diff --git a/spec/components/claim/status_tag_component_spec.rb b/spec/components/claim/status_tag_component_spec.rb index ad5f61c5e..e31d4cd91 100644 --- a/spec/components/claim/status_tag_component_spec.rb +++ b/spec/components/claim/status_tag_component_spec.rb @@ -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 diff --git a/spec/helpers/claims/claim_helper_spec.rb b/spec/helpers/claims/claim_helper_spec.rb index 8e0891ed9..83cd7f1df 100644 --- a/spec/helpers/claims/claim_helper_spec.rb +++ b/spec/helpers/claims/claim_helper_spec.rb @@ -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 diff --git a/spec/models/claims/claim_spec.rb b/spec/models/claims/claim_spec.rb index d2dd349c4..9811f4f06 100644 --- a/spec/models/claims/claim_spec.rb +++ b/spec/models/claims/claim_spec.rb @@ -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