Browse Source

Rename section from outgoings to savings

pull/1025/head
Jack S 4 years ago
parent
commit
ad34dc511e
  1. 2
      app/models/form/sales/sections/finances.rb
  2. 6
      app/models/form/sales/subsections/income_benefits_and_savings.rb
  3. 6
      spec/models/form/sales/subsections/income_benefits_and_savings_spec.rb

2
app/models/form/sales/sections/finances.rb

@ -6,7 +6,7 @@ class Form::Sales::Sections::Finances < ::Form::Section
@description = ""
@form = form
@subsections = [
Form::Sales::Subsections::IncomeBenefitsAndOutgoings.new(nil, nil, self),
Form::Sales::Subsections::IncomeBenefitsAndSavings.new(nil, nil, self),
]
end
end

6
app/models/form/sales/subsections/income_benefits_and_outgoings.rb → app/models/form/sales/subsections/income_benefits_and_savings.rb

@ -1,8 +1,8 @@
class Form::Sales::Subsections::IncomeBenefitsAndOutgoings < ::Form::Subsection
class Form::Sales::Subsections::IncomeBenefitsAndSavings < ::Form::Subsection
def initialize(id, hsh, section)
super
@id = "income_benefits_and_outgoings"
@label = "Income, benefits and outgoings"
@id = "income_benefits_and_savings"
@label = "Income, benefits and savings"
@section = section
@depends_on = [{ "setup_completed?" => true }]
end

6
spec/models/form/sales/subsections/income_benefits_and_outgoings_spec.rb → spec/models/form/sales/subsections/income_benefits_and_savings_spec.rb

@ -1,6 +1,6 @@
require "rails_helper"
RSpec.describe Form::Sales::Subsections::IncomeBenefitsAndOutgoings, type: :model do
RSpec.describe Form::Sales::Subsections::IncomeBenefitsAndSavings, type: :model do
subject(:subsection) { described_class.new(subsection_id, subsection_definition, section) }
let(:subsection_id) { nil }
@ -20,11 +20,11 @@ RSpec.describe Form::Sales::Subsections::IncomeBenefitsAndOutgoings, type: :mode
end
it "has the correct id" do
expect(subsection.id).to eq("income_benefits_and_outgoings")
expect(subsection.id).to eq("income_benefits_and_savings")
end
it "has the correct label" do
expect(subsection.label).to eq("Income, benefits and outgoings")
expect(subsection.label).to eq("Income, benefits and savings")
end
it "has correct depends on" do
Loading…
Cancel
Save