diff --git a/app/views/schemes/locations.html.erb b/app/views/schemes/locations.html.erb new file mode 100644 index 000000000..76ea99f76 --- /dev/null +++ b/app/views/schemes/locations.html.erb @@ -0,0 +1,11 @@ +<% title = @scheme.service_name %> +<% content_for :title, title %> + +<%= govuk_back_link(href: "#{request.referrer}")%> + +<%= render partial: "organisations/headings", locals: { main: @scheme.service_name, sub: nil } %> + + +<%= render SubNavigationComponent.new( + items: scheme_items(request.path, @scheme.id, @scheme.locations.count), +) %> diff --git a/db/seeds.rb b/db/seeds.rb index 65bac030d..1f027cc34 100644 --- a/db/seeds.rb +++ b/db/seeds.rb @@ -100,7 +100,7 @@ unless Rails.env.test? created_at: Time.zone.now, ) - Scheme.create!( + scheme = Scheme.create!( code: "7XYZ", service_name: "Caspermouth Center", sensitive: 1, diff --git a/spec/factories/location.rb b/spec/factories/location.rb new file mode 100644 index 000000000..580cbe372 --- /dev/null +++ b/spec/factories/location.rb @@ -0,0 +1,7 @@ +FactoryBot.define do + factory :location do + location_code { Faker::Name.initials(number: 10) } + postcode { Faker::Address.postcode } + scheme + end +end