diff --git a/app/helpers/admin/enterprises_helper.rb b/app/helpers/admin/enterprises_helper.rb index a81cc66e93..7201d9f87f 100644 --- a/app/helpers/admin/enterprises_helper.rb +++ b/app/helpers/admin/enterprises_helper.rb @@ -42,7 +42,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: is_shop }, { 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 }, diff --git a/spec/system/admin/vouchers_spec.rb b/spec/system/admin/vouchers_spec.rb index 08acad4ccb..7d9f586f6b 100644 --- a/spec/system/admin/vouchers_spec.rb +++ b/spec/system/admin/vouchers_spec.rb @@ -9,7 +9,7 @@ describe ' include WebHelper include AuthenticationHelper - let(:enterprise) { create(:supplier_enterprise, name: 'Feedme') } + let(:enterprise) { create(:supplier_enterprise, name: 'Feedme', sells: 'own') } let(:voucher_code) { 'awesomevoucher' } let(:amount) { 25 } let(:enterprise_user) { create(:user, enterprise_limit: 1) }