Browse Source

update current_collection_start_date

pull/981/head
Kat 4 years ago
parent
commit
484d28d692
  1. 2
      app/models/form_handler.rb
  2. 2
      spec/models/form_handler_spec.rb
  3. 2
      spec/requests/locations_controller_spec.rb

2
app/models/form_handler.rb

@ -50,7 +50,7 @@ class FormHandler
end end
def current_collection_start_date def current_collection_start_date
Time.utc(current_collection_start_year, 4, 5) Time.utc(current_collection_start_year, 4, 1)
end end
def form_name_from_start_year(year, type) def form_name_from_start_year(year, type)

2
spec/models/form_handler_spec.rb

@ -120,7 +120,7 @@ RSpec.describe FormHandler do
end end
it "returns the correct current start date" do it "returns the correct current start date" do
expect(form_handler.current_collection_start_date).to eq(Time.utc(2022, 4, 5)) expect(form_handler.current_collection_start_date).to eq(Time.utc(2022, 4, 1))
end end
end end

2
spec/requests/locations_controller_spec.rb

@ -1301,7 +1301,7 @@ RSpec.describe LocationsController, type: :request do
it "displays the new page with an error message" do it "displays the new page with an error message" do
expect(response).to have_http_status(:unprocessable_entity) expect(response).to have_http_status(:unprocessable_entity)
expect(page).to have_content(I18n.t("validations.location.deactivation_date.out_of_range", date: "5 April 2022")) expect(page).to have_content(I18n.t("validations.location.deactivation_date.out_of_range", date: "1 April 2022"))
end end
end end

Loading…
Cancel
Save