Fix groups link not appearing on menu

This commit is contained in:
Rohan Mitchell
2016-12-08 10:27:41 +11:00
parent a2a6ce1b3e
commit 6e6efea328
2 changed files with 12 additions and 0 deletions

View File

@@ -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

View File

@@ -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