<%= govuk_table do |table| %>
diff --git a/app/views/schemes/show.html.erb b/app/views/schemes/show.html.erb
index 8de58c210..d6a8ce129 100644
--- a/app/views/schemes/show.html.erb
+++ b/app/views/schemes/show.html.erb
@@ -10,7 +10,7 @@
<%= render partial: "organisations/headings", locals: { main: @scheme.service_name, sub: nil } %>
-<% if FeatureToggle.new_locations_table_layout_enabled? %>
+<% if FeatureToggle.location_toggle_enabled? %>
<% end %>
@@ -29,7 +29,7 @@
<% end %>
<% end %>
-<% if FeatureToggle.new_locations_table_layout_enabled? %>
+<% if FeatureToggle.location_toggle_enabled? %>
<% end %>
diff --git a/config/initializers/feature_toggle.rb b/config/initializers/feature_toggle.rb
index 08a8a4920..7cd75ddd3 100644
--- a/config/initializers/feature_toggle.rb
+++ b/config/initializers/feature_toggle.rb
@@ -22,8 +22,4 @@ class FeatureToggle
def self.managing_for_other_user_enabled?
!Rails.env.production?
end
-
- def self.new_locations_table_layout_enabled?
- !Rails.env.production?
- end
end
diff --git a/spec/features/schemes_spec.rb b/spec/features/schemes_spec.rb
index 42a2b31ec..bee63350a 100644
--- a/spec/features/schemes_spec.rb
+++ b/spec/features/schemes_spec.rb
@@ -212,7 +212,7 @@ RSpec.describe "Schemes scheme Features" do
context "when I click locations link and the new locations layout feature toggle is disabled" do
before do
- allow(FeatureToggle).to receive(:new_locations_table_layout_enabled?).and_return(false)
+ allow(FeatureToggle).to receive(:location_toggle_enabled?).and_return(false)
click_link("Locations")
end
diff --git a/spec/requests/locations_controller_spec.rb b/spec/requests/locations_controller_spec.rb
index 91f2e913c..45463ceb1 100644
--- a/spec/requests/locations_controller_spec.rb
+++ b/spec/requests/locations_controller_spec.rb
@@ -877,7 +877,7 @@ RSpec.describe LocationsController, type: :request do
end
it "shows locations with correct data wben the new locations layout feature toggle is disabled" do
- allow(FeatureToggle).to receive(:new_locations_table_layout_enabled?).and_return(false)
+ allow(FeatureToggle).to receive(:location_toggle_enabled?).and_return(false)
get "/schemes/#{scheme.id}/locations"
locations.each do |location|
expect(page).to have_content(location.id)
@@ -993,7 +993,7 @@ RSpec.describe LocationsController, type: :request do
end
it "shows locations with correct data wben the new locations layout feature toggle is disabled" do
- allow(FeatureToggle).to receive(:new_locations_table_layout_enabled?).and_return(false)
+ allow(FeatureToggle).to receive(:location_toggle_enabled?).and_return(false)
get "/schemes/#{scheme.id}/locations"
locations.each do |location|
expect(page).to have_content(location.id)