mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Fix rubocop warnings
This commit is contained in:
@@ -14,6 +14,7 @@ module Admin
|
||||
producers.size == 1 ? producers.first.id : nil
|
||||
end
|
||||
|
||||
# rubocop:disable Metrics/MethodLength
|
||||
def enterprise_side_menu_items(enterprise)
|
||||
is_shop = enterprise.sells != "none"
|
||||
show_properties = !!enterprise.is_primary_producer
|
||||
@@ -34,7 +35,7 @@ module Admin
|
||||
{ name: 'shipping_methods', icon_class: "icon-truck", show: show_shipping_methods },
|
||||
{ name: 'payment_methods', icon_class: "icon-money", show: show_payment_methods },
|
||||
{ name: 'enterprise_fees', icon_class: "icon-tasks", show: show_enterprise_fees },
|
||||
{ name: 'vouchers', icon_class: "icon-ticket", show: true },
|
||||
{ name: 'vouchers', icon_class: "icon-ticket", show: true },
|
||||
{ name: 'enterprise_permissions', icon_class: "icon-plug", show: true,
|
||||
href: admin_enterprise_relationships_path },
|
||||
{ name: 'inventory_settings', icon_class: "icon-list-ol", show: is_shop },
|
||||
@@ -43,5 +44,6 @@ module Admin
|
||||
{ name: 'users', icon_class: "icon-user", show: true }
|
||||
]
|
||||
end
|
||||
# rubocop:enable Metrics/MethodLength
|
||||
end
|
||||
end
|
||||
|
||||
@@ -742,7 +742,7 @@ describe Enterprise do
|
||||
allow(Enterprise).to receive(:find_available_permalink).and_return("available_permalink")
|
||||
expect(Enterprise).to receive(:find_available_permalink).with("Name To Turn Into A Permalink")
|
||||
expect do
|
||||
enterprise.send(:initialize_permalink)
|
||||
enterprise.send(:initialize_permalink)
|
||||
end.to change { enterprise.permalink }.to("available_permalink")
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user