Browse Source

Update page id (URL)

pull/877/head
baarkerlounger 3 years ago
parent
commit
8fd48e158e
  1. 2
      app/models/form/sales/pages/sale_date.rb
  2. 2
      spec/models/form/sales/pages/sale_date_spec.rb
  3. 2
      spec/models/form/sales/subsections/setup_spec.rb

2
app/models/form/sales/pages/sale_date.rb

@ -1,7 +1,7 @@
class Form::Sales::Pages::SaleDate < ::Form::Page class Form::Sales::Pages::SaleDate < ::Form::Page
def initialize(id, hsh, subsection) def initialize(id, hsh, subsection)
super super
@id = "sale_date" @id = "completion_date"
@header = "" @header = ""
@description = "" @description = ""
@subsection = subsection @subsection = subsection

2
spec/models/form/sales/pages/sale_date_spec.rb

@ -16,7 +16,7 @@ RSpec.describe Form::Sales::Pages::SaleDate, type: :model do
end end
it "has the correct id" do it "has the correct id" do
expect(page.id).to eq("sale_date") expect(page.id).to eq("completion_date")
end end
it "has the correct header" do it "has the correct header" do

2
spec/models/form/sales/subsections/setup_spec.rb

@ -13,7 +13,7 @@ RSpec.describe Form::Sales::Subsections::Setup, type: :model do
it "has correct pages" do it "has correct pages" do
expect(setup.pages.map(&:id)).to eq( expect(setup.pages.map(&:id)).to eq(
%w[organisation created_by purchaser_code sale_date], %w[organisation created_by purchaser_code completion_date],
) )
end end

Loading…
Cancel
Save