* seed la data before links * lint * Only seed LAs once for tests
@ -309,6 +309,12 @@ unless Rails.env.test?
pp "Seeded 3 dummy schemes"
end
if LocalAuthority.count.zero?
la_path = "config/local_authorities_data/initial_local_authorities.csv"
service = Imports::LocalAuthoritiesService.new(path: la_path)
service.call
if (Rails.env.development? || Rails.env.review?) && LocalAuthorityLink.count.zero?
links_data_path = "config/local_authorities_data/local_authority_links_2023.csv"
service = Imports::LocalAuthorityLinksService.new(path: links_data_path)
@ -113,6 +113,9 @@ RSpec.configure do |config|
config.before do
RequestHelper.stub_http_requests
config.before(:suite) do
Rails.application.load_seed