From 5bb906563a7186d6c9ade577e9e962848d03563c Mon Sep 17 00:00:00 2001 From: natdeanlewissoftwire Date: Thu, 23 Mar 2023 13:45:18 +0000 Subject: [PATCH 1/3] refactor: rubocop --- spec/helpers/schemes_helper_spec.rb | 5 ++++- spec/models/scheme_spec.rb | 2 +- spec/models/validations/date_validations_spec.rb | 4 ++-- spec/models/validations/setup_validations_spec.rb | 4 ++-- spec/requests/schemes_controller_spec.rb | 2 +- 5 files changed, 10 insertions(+), 7 deletions(-) diff --git a/spec/helpers/schemes_helper_spec.rb b/spec/helpers/schemes_helper_spec.rb index 88b824b80..d65c7c635 100644 --- a/spec/helpers/schemes_helper_spec.rb +++ b/spec/helpers/schemes_helper_spec.rb @@ -106,11 +106,14 @@ RSpec.describe SchemesHelper do intended_stay: "P", created_at: Time.zone.local(2022, 4, 1)) end - let!(:location) { FactoryBot.create(:location, scheme:) } let!(:scheme_where_managing_organisation_is_owning_organisation) { FactoryBot.create(:scheme, arrangement_type: "D") } let(:support_user) { FactoryBot.create(:user, :support) } let(:coordinator_user) { FactoryBot.create(:user, :data_coordinator) } + before do + FactoryBot.create(:location, scheme:) + end + it "returns correct display attributes for a support user" do attributes = [ { name: "Scheme code", value: "S#{scheme.id}" }, diff --git a/spec/models/scheme_spec.rb b/spec/models/scheme_spec.rb index f6daf6fe7..db824d7cd 100644 --- a/spec/models/scheme_spec.rb +++ b/spec/models/scheme_spec.rb @@ -94,9 +94,9 @@ RSpec.describe Scheme, type: :model do describe "status" do let(:scheme) { FactoryBot.build(:scheme) } - let!(:location) { FactoryBot.create(:location, scheme:) } before do + FactoryBot.create(:location, scheme:) Timecop.freeze(2022, 6, 7) end diff --git a/spec/models/validations/date_validations_spec.rb b/spec/models/validations/date_validations_spec.rb index 1211b7ef7..3ac6232a0 100644 --- a/spec/models/validations/date_validations_spec.rb +++ b/spec/models/validations/date_validations_spec.rb @@ -171,9 +171,9 @@ RSpec.describe Validations::DateValidations do context "with a scheme that is reactivating soon" do let(:scheme) { create(:scheme) } - let!(:location) { FactoryBot.create(:location, scheme:) } before do + FactoryBot.create(:location, scheme:) create(:scheme_deactivation_period, deactivation_date: Time.zone.local(2022, 6, 4), reactivation_date: Time.zone.local(2022, 8, 4), scheme:) scheme.reload end @@ -196,9 +196,9 @@ RSpec.describe Validations::DateValidations do context "with a scheme that has many reactivations soon" do let(:scheme) { create(:scheme) } - let!(:location) { FactoryBot.create(:location, scheme:) } before do + FactoryBot.create(:location, scheme:) create(:scheme_deactivation_period, deactivation_date: Time.zone.local(2022, 6, 4), reactivation_date: Time.zone.local(2022, 8, 4), scheme:) create(:scheme_deactivation_period, deactivation_date: Time.zone.local(2022, 6, 2), reactivation_date: Time.zone.local(2022, 8, 3), scheme:) create(:scheme_deactivation_period, deactivation_date: Time.zone.local(2022, 6, 1), reactivation_date: Time.zone.local(2022, 9, 4), scheme:) diff --git a/spec/models/validations/setup_validations_spec.rb b/spec/models/validations/setup_validations_spec.rb index c1c9c27c9..16d52fb07 100644 --- a/spec/models/validations/setup_validations_spec.rb +++ b/spec/models/validations/setup_validations_spec.rb @@ -186,9 +186,9 @@ RSpec.describe Validations::SetupValidations do context "with a scheme that is reactivating soon" do let(:scheme) { create(:scheme, created_at: Time.zone.local(2022, 4, 1)) } - let!(:location) { FactoryBot.create(:location, scheme:) } before do + FactoryBot.create(:location, scheme:) create(:scheme_deactivation_period, deactivation_date: Time.zone.local(2022, 6, 4), reactivation_date: Time.zone.local(2022, 8, 4), scheme:) scheme.reload end @@ -211,9 +211,9 @@ RSpec.describe Validations::SetupValidations do context "with a scheme that has many reactivations soon" do let(:scheme) { create(:scheme, created_at: Time.zone.local(2022, 4, 1)) } - let!(:location) { FactoryBot.create(:location, scheme:) } before do + FactoryBot.create(:location, scheme:) create(:scheme_deactivation_period, deactivation_date: Time.zone.local(2022, 6, 4), reactivation_date: Time.zone.local(2022, 8, 4), scheme:) create(:scheme_deactivation_period, deactivation_date: Time.zone.local(2022, 6, 2), reactivation_date: Time.zone.local(2022, 8, 3), scheme:) create(:scheme_deactivation_period, deactivation_date: Time.zone.local(2022, 6, 1), reactivation_date: Time.zone.local(2022, 9, 4), scheme:) diff --git a/spec/requests/schemes_controller_spec.rb b/spec/requests/schemes_controller_spec.rb index af4a83560..fb9150940 100644 --- a/spec/requests/schemes_controller_spec.rb +++ b/spec/requests/schemes_controller_spec.rb @@ -264,9 +264,9 @@ RSpec.describe SchemesController, type: :request do let(:user) { FactoryBot.create(:user, :data_coordinator) } let!(:scheme) { FactoryBot.create(:scheme, owning_organisation: user.organisation) } let(:add_deactivations) { scheme.scheme_deactivation_periods << scheme_deactivation_period } - let!(:location) { FactoryBot.create(:location, scheme:) } before do + FactoryBot.create(:location, scheme:) Timecop.freeze(Time.utc(2022, 10, 10)) sign_in user add_deactivations From 48ed1929d3daf9de6ccf38b0300acd84cd005c1a Mon Sep 17 00:00:00 2001 From: natdeanlewissoftwire Date: Thu, 23 Mar 2023 16:11:17 +0000 Subject: [PATCH 2/3] feat: add tests for incomplete schemes --- spec/helpers/schemes_helper_spec.rb | 277 ++++++++++++++++------------ 1 file changed, 161 insertions(+), 116 deletions(-) diff --git a/spec/helpers/schemes_helper_spec.rb b/spec/helpers/schemes_helper_spec.rb index d65c7c635..1b4d57a4c 100644 --- a/spec/helpers/schemes_helper_spec.rb +++ b/spec/helpers/schemes_helper_spec.rb @@ -110,170 +110,215 @@ RSpec.describe SchemesHelper do let(:support_user) { FactoryBot.create(:user, :support) } let(:coordinator_user) { FactoryBot.create(:user, :data_coordinator) } - before do - FactoryBot.create(:location, scheme:) - end + context "when scheme has no locations" do + it "returns correct display attributes for a support user" do + attributes = [ + { name: "Scheme code", value: "S#{scheme.id}" }, + { name: "Name", value: "Test service_name", edit: true }, + { name: "Confidential information", value: "No", edit: true }, + { name: "Type of scheme", value: "Housing for older people" }, + { name: "Registered under Care Standards Act 2000", value: "Yes – registered care home providing personal care" }, + { name: "Housing stock owned by", value: "Acme LTD Owning", edit: true }, + { name: "Support services provided by", value: "A registered charity or voluntary organisation" }, + { name: "Primary client group", value: "Rough sleepers" }, + { name: "Has another client group", value: "Yes" }, + { name: "Secondary client group", value: "Refugees (permanent)" }, + { name: "Level of support given", value: "High level" }, + { name: "Intended length of stay", value: "Permanent" }, + { name: "Availability", value: "Active from 1 April 2022" }, + { name: "Status", value: status_tag(:incomplete) }, + ] + expect(display_scheme_attributes(scheme, support_user)).to eq(attributes) + end - it "returns correct display attributes for a support user" do - attributes = [ - { name: "Scheme code", value: "S#{scheme.id}" }, - { name: "Name", value: "Test service_name", edit: true }, - { name: "Confidential information", value: "No", edit: true }, - { name: "Type of scheme", value: "Housing for older people" }, - { name: "Registered under Care Standards Act 2000", value: "Yes – registered care home providing personal care" }, - { name: "Housing stock owned by", value: "Acme LTD Owning", edit: true }, - { name: "Support services provided by", value: "A registered charity or voluntary organisation" }, - { name: "Primary client group", value: "Rough sleepers" }, - { name: "Has another client group", value: "Yes" }, - { name: "Secondary client group", value: "Refugees (permanent)" }, - { name: "Level of support given", value: "High level" }, - { name: "Intended length of stay", value: "Permanent" }, - { name: "Availability", value: "Active from 1 April 2022" }, - { name: "Status", value: status_tag(:active) }, - ] - expect(display_scheme_attributes(scheme, support_user)).to eq(attributes) + it "returns correct display attributes for a coordinator user" do + attributes = [ + { name: "Scheme code", value: "S#{scheme.id}" }, + { name: "Name", value: "Test service_name", edit: true }, + { name: "Confidential information", value: "No", edit: true }, + { name: "Type of scheme", value: "Housing for older people" }, + { name: "Registered under Care Standards Act 2000", value: "Yes – registered care home providing personal care" }, + { name: "Support services provided by", value: "A registered charity or voluntary organisation" }, + { name: "Primary client group", value: "Rough sleepers" }, + { name: "Has another client group", value: "Yes" }, + { name: "Secondary client group", value: "Refugees (permanent)" }, + { name: "Level of support given", value: "High level" }, + { name: "Intended length of stay", value: "Permanent" }, + { name: "Availability", value: "Active from 1 April 2022" }, + { name: "Status", value: status_tag(:incomplete) }, + ] + expect(display_scheme_attributes(scheme, coordinator_user)).to eq(attributes) + end end - it "returns correct display attributes for a coordinator user" do - attributes = [ - { name: "Scheme code", value: "S#{scheme.id}" }, - { name: "Name", value: "Test service_name", edit: true }, - { name: "Confidential information", value: "No", edit: true }, - { name: "Type of scheme", value: "Housing for older people" }, - { name: "Registered under Care Standards Act 2000", value: "Yes – registered care home providing personal care" }, - { name: "Support services provided by", value: "A registered charity or voluntary organisation" }, - { name: "Primary client group", value: "Rough sleepers" }, - { name: "Has another client group", value: "Yes" }, - { name: "Secondary client group", value: "Refugees (permanent)" }, - { name: "Level of support given", value: "High level" }, - { name: "Intended length of stay", value: "Permanent" }, - { name: "Availability", value: "Active from 1 April 2022" }, - { name: "Status", value: status_tag(:active) }, - ] - expect(display_scheme_attributes(scheme, coordinator_user)).to eq(attributes) - end + context "when scheme has a location" do - context "when the scheme toggle is disabled" do - it "doesn't show the scheme status" do - allow(FeatureToggle).to receive(:scheme_toggle_enabled?).and_return(false) - attributes = display_scheme_attributes(scheme, support_user).find { |x| x[:name] == "Status" } - expect(attributes).to be_nil + before do + FactoryBot.create(:location, scheme:) end - end - context "when the managing organisation is the owning organisation" do - it "doesn't show the organisation providing support" do - attributes = display_scheme_attributes(scheme_where_managing_organisation_is_owning_organisation, support_user).find { |x| x[:name] == "Organisation providing support" } - expect(attributes).to be_nil + it "returns correct display attributes for a support user" do + attributes = [ + { name: "Scheme code", value: "S#{scheme.id}" }, + { name: "Name", value: "Test service_name", edit: true }, + { name: "Confidential information", value: "No", edit: true }, + { name: "Type of scheme", value: "Housing for older people" }, + { name: "Registered under Care Standards Act 2000", value: "Yes – registered care home providing personal care" }, + { name: "Housing stock owned by", value: "Acme LTD Owning", edit: true }, + { name: "Support services provided by", value: "A registered charity or voluntary organisation" }, + { name: "Primary client group", value: "Rough sleepers" }, + { name: "Has another client group", value: "Yes" }, + { name: "Secondary client group", value: "Refugees (permanent)" }, + { name: "Level of support given", value: "High level" }, + { name: "Intended length of stay", value: "Permanent" }, + { name: "Availability", value: "Active from 1 April 2022" }, + { name: "Status", value: status_tag(:active) }, + ] + expect(display_scheme_attributes(scheme, support_user)).to eq(attributes) end - end - context "when viewing availability" do - context "with no deactivations" do - it "displays created_at as availability date" do - availability_attribute = display_scheme_attributes(scheme, support_user).find { |x| x[:name] == "Availability" }[:value] + it "returns correct display attributes for a coordinator user" do + attributes = [ + { name: "Scheme code", value: "S#{scheme.id}" }, + { name: "Name", value: "Test service_name", edit: true }, + { name: "Confidential information", value: "No", edit: true }, + { name: "Type of scheme", value: "Housing for older people" }, + { name: "Registered under Care Standards Act 2000", value: "Yes – registered care home providing personal care" }, + { name: "Support services provided by", value: "A registered charity or voluntary organisation" }, + { name: "Primary client group", value: "Rough sleepers" }, + { name: "Has another client group", value: "Yes" }, + { name: "Secondary client group", value: "Refugees (permanent)" }, + { name: "Level of support given", value: "High level" }, + { name: "Intended length of stay", value: "Permanent" }, + { name: "Availability", value: "Active from 1 April 2022" }, + { name: "Status", value: status_tag(:active) }, + ] + expect(display_scheme_attributes(scheme, coordinator_user)).to eq(attributes) + end - expect(availability_attribute).to eq("Active from #{scheme.created_at.to_formatted_s(:govuk_date)}") + context "when the scheme toggle is disabled" do + it "doesn't show the scheme status" do + allow(FeatureToggle).to receive(:scheme_toggle_enabled?).and_return(false) + attributes = display_scheme_attributes(scheme, support_user).find { |x| x[:name] == "Status" } + expect(attributes).to be_nil end + end - it "displays current collection start date as availability date if created_at is later than collection start date" do - scheme.update!(created_at: Time.zone.local(2022, 4, 16)) - availability_attribute = display_scheme_attributes(scheme, support_user).find { |x| x[:name] == "Availability" }[:value] - - expect(availability_attribute).to eq("Active from 1 April 2022") + context "when the managing organisation is the owning organisation" do + it "doesn't show the organisation providing support" do + attributes = display_scheme_attributes(scheme_where_managing_organisation_is_owning_organisation, support_user).find { |x| x[:name] == "Organisation providing support" } + expect(attributes).to be_nil end end - context "with previous deactivations" do - context "and all reactivated deactivations" do - before do - FactoryBot.create(:scheme_deactivation_period, deactivation_date: Time.zone.local(2022, 8, 10), reactivation_date: Time.zone.local(2022, 9, 1), scheme:) - FactoryBot.create(:scheme_deactivation_period, deactivation_date: Time.zone.local(2022, 9, 15), reactivation_date: Time.zone.local(2022, 9, 28), scheme:) - scheme.reload + context "when viewing availability" do + context "with no deactivations" do + it "displays created_at as availability date" do + availability_attribute = display_scheme_attributes(scheme, support_user).find { |x| x[:name] == "Availability" }[:value] + + expect(availability_attribute).to eq("Active from #{scheme.created_at.to_formatted_s(:govuk_date)}") end - it "displays the timeline of availability" do + it "displays current collection start date as availability date if created_at is later than collection start date" do + scheme.update!(created_at: Time.zone.local(2022, 4, 16)) availability_attribute = display_scheme_attributes(scheme, support_user).find { |x| x[:name] == "Availability" }[:value] - expect(availability_attribute).to eq("Active from 1 April 2022 to 9 August 2022\nDeactivated on 10 August 2022\nActive from 1 September 2022 to 14 September 2022\nDeactivated on 15 September 2022\nActive from 28 September 2022") + expect(availability_attribute).to eq("Active from 1 April 2022") end end - context "and non reactivated deactivation" do - before do - FactoryBot.create(:scheme_deactivation_period, deactivation_date: Time.zone.local(2022, 8, 10), reactivation_date: Time.zone.local(2022, 9, 1), scheme:) - FactoryBot.create(:scheme_deactivation_period, deactivation_date: Time.zone.local(2022, 9, 15), reactivation_date: nil, scheme:) - scheme.reload + context "with previous deactivations" do + context "and all reactivated deactivations" do + before do + FactoryBot.create(:scheme_deactivation_period, deactivation_date: Time.zone.local(2022, 8, 10), reactivation_date: Time.zone.local(2022, 9, 1), scheme:) + FactoryBot.create(:scheme_deactivation_period, deactivation_date: Time.zone.local(2022, 9, 15), reactivation_date: Time.zone.local(2022, 9, 28), scheme:) + scheme.reload + end + + it "displays the timeline of availability" do + availability_attribute = display_scheme_attributes(scheme, support_user).find { |x| x[:name] == "Availability" }[:value] + + expect(availability_attribute).to eq("Active from 1 April 2022 to 9 August 2022\nDeactivated on 10 August 2022\nActive from 1 September 2022 to 14 September 2022\nDeactivated on 15 September 2022\nActive from 28 September 2022") + end end - it "displays the timeline of availability" do - availability_attribute = display_scheme_attributes(scheme, support_user).find { |x| x[:name] == "Availability" }[:value] + context "and non reactivated deactivation" do + before do + FactoryBot.create(:scheme_deactivation_period, deactivation_date: Time.zone.local(2022, 8, 10), reactivation_date: Time.zone.local(2022, 9, 1), scheme:) + FactoryBot.create(:scheme_deactivation_period, deactivation_date: Time.zone.local(2022, 9, 15), reactivation_date: nil, scheme:) + scheme.reload + end + + it "displays the timeline of availability" do + availability_attribute = display_scheme_attributes(scheme, support_user).find { |x| x[:name] == "Availability" }[:value] - expect(availability_attribute).to eq("Active from 1 April 2022 to 9 August 2022\nDeactivated on 10 August 2022\nActive from 1 September 2022 to 14 September 2022\nDeactivated on 15 September 2022") + expect(availability_attribute).to eq("Active from 1 April 2022 to 9 August 2022\nDeactivated on 10 August 2022\nActive from 1 September 2022 to 14 September 2022\nDeactivated on 15 September 2022") + end end end - end - context "with out of order deactivations" do - context "and all reactivated deactivations" do - before do - FactoryBot.create(:scheme_deactivation_period, deactivation_date: Time.zone.local(2022, 9, 24), reactivation_date: Time.zone.local(2022, 9, 28), scheme:) - FactoryBot.create(:scheme_deactivation_period, deactivation_date: Time.zone.local(2022, 6, 15), reactivation_date: Time.zone.local(2022, 6, 18), scheme:) - scheme.reload + context "with out of order deactivations" do + context "and all reactivated deactivations" do + before do + FactoryBot.create(:scheme_deactivation_period, deactivation_date: Time.zone.local(2022, 9, 24), reactivation_date: Time.zone.local(2022, 9, 28), scheme:) + FactoryBot.create(:scheme_deactivation_period, deactivation_date: Time.zone.local(2022, 6, 15), reactivation_date: Time.zone.local(2022, 6, 18), scheme:) + scheme.reload + end + + it "displays the timeline of availability" do + availability_attribute = display_scheme_attributes(scheme, support_user).find { |x| x[:name] == "Availability" }[:value] + + expect(availability_attribute).to eq("Active from 1 April 2022 to 14 June 2022\nDeactivated on 15 June 2022\nActive from 18 June 2022 to 23 September 2022\nDeactivated on 24 September 2022\nActive from 28 September 2022") + end end - it "displays the timeline of availability" do - availability_attribute = display_scheme_attributes(scheme, support_user).find { |x| x[:name] == "Availability" }[:value] + context "and one non reactivated deactivation" do + before do + FactoryBot.create(:scheme_deactivation_period, deactivation_date: Time.zone.local(2022, 9, 24), reactivation_date: Time.zone.local(2022, 9, 28), scheme:) + FactoryBot.create(:scheme_deactivation_period, deactivation_date: Time.zone.local(2022, 6, 15), reactivation_date: nil, scheme:) + scheme.reload + end + + it "displays the timeline of availability" do + availability_attribute = display_scheme_attributes(scheme, support_user).find { |x| x[:name] == "Availability" }[:value] - expect(availability_attribute).to eq("Active from 1 April 2022 to 14 June 2022\nDeactivated on 15 June 2022\nActive from 18 June 2022 to 23 September 2022\nDeactivated on 24 September 2022\nActive from 28 September 2022") + expect(availability_attribute).to eq("Active from 1 April 2022 to 14 June 2022\nDeactivated on 15 June 2022\nActive from 28 September 2022") + end end end - context "and one non reactivated deactivation" do - before do - FactoryBot.create(:scheme_deactivation_period, deactivation_date: Time.zone.local(2022, 9, 24), reactivation_date: Time.zone.local(2022, 9, 28), scheme:) - FactoryBot.create(:scheme_deactivation_period, deactivation_date: Time.zone.local(2022, 6, 15), reactivation_date: nil, scheme:) - scheme.reload - end + context "with multiple out of order deactivations" do + context "and one non reactivated deactivation" do + before do + FactoryBot.create(:scheme_deactivation_period, deactivation_date: Time.zone.local(2022, 9, 24), reactivation_date: Time.zone.local(2022, 9, 28), scheme:) + FactoryBot.create(:scheme_deactivation_period, deactivation_date: Time.zone.local(2022, 10, 24), reactivation_date: Time.zone.local(2022, 10, 28), scheme:) + FactoryBot.create(:scheme_deactivation_period, deactivation_date: Time.zone.local(2022, 6, 15), reactivation_date: nil, scheme:) + scheme.reload + end - it "displays the timeline of availability" do - availability_attribute = display_scheme_attributes(scheme, support_user).find { |x| x[:name] == "Availability" }[:value] + it "displays the timeline of availability" do + availability_attribute = display_scheme_attributes(scheme, support_user).find { |x| x[:name] == "Availability" }[:value] - expect(availability_attribute).to eq("Active from 1 April 2022 to 14 June 2022\nDeactivated on 15 June 2022\nActive from 28 September 2022") + expect(availability_attribute).to eq("Active from 1 April 2022 to 14 June 2022\nDeactivated on 15 June 2022\nActive from 28 September 2022 to 23 October 2022\nDeactivated on 24 October 2022\nActive from 28 October 2022") + end end end - end - context "with multiple out of order deactivations" do - context "and one non reactivated deactivation" do + context "with intersecting deactivations" do before do - FactoryBot.create(:scheme_deactivation_period, deactivation_date: Time.zone.local(2022, 9, 24), reactivation_date: Time.zone.local(2022, 9, 28), scheme:) - FactoryBot.create(:scheme_deactivation_period, deactivation_date: Time.zone.local(2022, 10, 24), reactivation_date: Time.zone.local(2022, 10, 28), scheme:) - FactoryBot.create(:scheme_deactivation_period, deactivation_date: Time.zone.local(2022, 6, 15), reactivation_date: nil, scheme:) + FactoryBot.create(:scheme_deactivation_period, deactivation_date: Time.zone.local(2022, 10, 10), reactivation_date: Time.zone.local(2022, 12, 1), scheme:) + FactoryBot.create(:scheme_deactivation_period, deactivation_date: Time.zone.local(2022, 11, 11), reactivation_date: Time.zone.local(2022, 12, 11), scheme:) scheme.reload end it "displays the timeline of availability" do availability_attribute = display_scheme_attributes(scheme, support_user).find { |x| x[:name] == "Availability" }[:value] - expect(availability_attribute).to eq("Active from 1 April 2022 to 14 June 2022\nDeactivated on 15 June 2022\nActive from 28 September 2022 to 23 October 2022\nDeactivated on 24 October 2022\nActive from 28 October 2022") + expect(availability_attribute).to eq("Active from 1 April 2022 to 9 October 2022\nDeactivated on 10 October 2022\nActive from 11 December 2022") end end end - - context "with intersecting deactivations" do - before do - FactoryBot.create(:scheme_deactivation_period, deactivation_date: Time.zone.local(2022, 10, 10), reactivation_date: Time.zone.local(2022, 12, 1), scheme:) - FactoryBot.create(:scheme_deactivation_period, deactivation_date: Time.zone.local(2022, 11, 11), reactivation_date: Time.zone.local(2022, 12, 11), scheme:) - scheme.reload - end - - it "displays the timeline of availability" do - availability_attribute = display_scheme_attributes(scheme, support_user).find { |x| x[:name] == "Availability" }[:value] - - expect(availability_attribute).to eq("Active from 1 April 2022 to 9 October 2022\nDeactivated on 10 October 2022\nActive from 11 December 2022") - end - end end + end end From fb7d075fa1ec3b528f032225c11932f9514a3111 Mon Sep 17 00:00:00 2001 From: natdeanlewissoftwire Date: Thu, 23 Mar 2023 16:13:19 +0000 Subject: [PATCH 3/3] refactor: linting --- spec/helpers/schemes_helper_spec.rb | 2 -- 1 file changed, 2 deletions(-) diff --git a/spec/helpers/schemes_helper_spec.rb b/spec/helpers/schemes_helper_spec.rb index 1b4d57a4c..6ab283eca 100644 --- a/spec/helpers/schemes_helper_spec.rb +++ b/spec/helpers/schemes_helper_spec.rb @@ -152,7 +152,6 @@ RSpec.describe SchemesHelper do end context "when scheme has a location" do - before do FactoryBot.create(:location, scheme:) end @@ -319,6 +318,5 @@ RSpec.describe SchemesHelper do end end end - end end