* Softrun rubocop * Hardrun rubocop (-A) * Change a rubocop rule * Add missing cops * Undo & redo rubocop -A
23 lines
770 B
Ruby
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
|