docbrown/spec/routing/data_update_scripts_admin_routes_spec.rb
Mac Siri 842e6880b8
Routine rubocop fix on /spec (#19217)
* Softrun rubocop

* Hardrun rubocop (-A)

* Change a rubocop rule

* Add missing cops

* Undo & redo rubocop -A
2023-03-21 09:55:26 -04:00

23 lines
770 B
Ruby

require "rails_helper"
RSpec.describe "Data Update Scripts admin routes" do
it "renders the data update scripts admin route if the feature flag is enabled" do
allow(FeatureFlag).to receive(:enabled?).with(:data_update_scripts).and_return(true)
expect(get: admin_data_update_scripts_path).to route_to(
controller: "admin/data_update_scripts",
action: "index",
locale: nil,
)
end
it "does not render the data update scripts admin route if the feature flag is disabled" do
allow(FeatureFlag).to receive(:enabled?).with(:data_update_scripts).and_return(false)
expect(get: admin_data_update_scripts_path).not_to route_to(
controller: "admin/data_update_scripts",
action: "index",
locale: nil,
)
end
end