From 6b733d92d79c87adb19e59a172670e3cc9690533 Mon Sep 17 00:00:00 2001 From: Rebecca Pearce <17481621+beccapearce@users.noreply.github.com> Date: Wed, 14 Feb 2024 17:03:52 +0000 Subject: [PATCH] Change required fields in farming grant finder The department has asked that we remove the requirement for areas of interest and land types to be mandatory fields. --- app/models/farming_grant_option.rb | 2 -- spec/models/farming_grant_option_spec.rb | 10 ---------- 2 files changed, 12 deletions(-) diff --git a/app/models/farming_grant_option.rb b/app/models/farming_grant_option.rb index 9ddfb618f..d9370585f 100644 --- a/app/models/farming_grant_option.rb +++ b/app/models/farming_grant_option.rb @@ -1,7 +1,5 @@ class FarmingGrantOption < Document validates :open_or_closed, presence: true - validates :areas_of_interest, presence: true - validates :land_types, presence: true validates :funding_types, presence: true validates :grant_schemes, presence: true validates :payment_types, presence: true diff --git a/spec/models/farming_grant_option_spec.rb b/spec/models/farming_grant_option_spec.rb index 051d3b9f0..06b710056 100644 --- a/spec/models/farming_grant_option_spec.rb +++ b/spec/models/farming_grant_option_spec.rb @@ -20,16 +20,6 @@ expect(farming_grant_option).not_to be_valid end - it "is invalid if the areas of interest field is missing" do - farming_grant_option.areas_of_interest = nil - expect(farming_grant_option).not_to be_valid - end - - it "is invalid if the land types field is missing" do - farming_grant_option.land_types = nil - expect(farming_grant_option).not_to be_valid - end - it "is invalid if the funding types field is missing" do farming_grant_option.funding_types = nil expect(farming_grant_option).not_to be_valid