mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Fix groups link not appearing on menu
This commit is contained in:
@@ -18,6 +18,7 @@ module Spree
|
||||
klass ||= name.singularize.to_sym
|
||||
klass = :overview if klass == :dashboard
|
||||
klass = Spree::Order if klass == :bulk_order_management
|
||||
klass = EnterpriseGroup if klass == :group
|
||||
klass
|
||||
end
|
||||
alias_method_chain :klass_for, :sym_fallback
|
||||
|
||||
@@ -105,6 +105,17 @@ feature %q{
|
||||
end
|
||||
|
||||
context "as an enterprise user" do
|
||||
let(:user) { create_enterprise_user }
|
||||
let!(:enterprise) { create(:distributor_enterprise, owner: user) }
|
||||
let!(:group) { create(:enterprise_group, name: 'My Group', owner: user) }
|
||||
|
||||
it "lets me access enterprise groups" do
|
||||
quick_login_as user
|
||||
visit spree.admin_path
|
||||
click_link 'Groups'
|
||||
expect(page).to have_content 'My Group'
|
||||
end
|
||||
|
||||
xit "should show me only enterprises I manage when creating a new enterprise group"
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user