From 017d6b12738b454c8b83babc7934f6de0cc8bf33 Mon Sep 17 00:00:00 2001 From: Rafael Schouten Date: Mon, 6 Oct 2014 01:35:46 +1100 Subject: [PATCH] move for order cycles permission, for now, but needs review --- spec/models/spree/ability_spec.rb | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/spec/models/spree/ability_spec.rb b/spec/models/spree/ability_spec.rb index 4169222fa8..f9a1b9fcd3 100644 --- a/spec/models/spree/ability_spec.rb +++ b/spec/models/spree/ability_spec.rb @@ -239,7 +239,7 @@ module Spree end end - context 'Order Cycle co-ordinator, distributor enterprise manager' do + context 'Order Cycle co-ordinator, distriutor enterprise manager' do let (:user) do user = create(:user) user.spree_roles = [] @@ -265,6 +265,11 @@ module Spree it "should be able to read/write EnterpriseFees" do should have_ability([:admin, :index, :read, :create, :edit, :bulk_update, :destroy], for: EnterpriseFee) end + + #TODO clarify :for_order_cycle and its purpose - and possibly rename it. + it "should be able to do something with order cycles (??)" do + should have_ability([:for_order_cycle], Enterprise) + end end context 'enterprise manager' do @@ -284,7 +289,7 @@ module Spree end it 'should have the ability administrate and create enterpises' do - should have_ability([:admin, :index, :for_order_cycle, :create], for: Enterprise) + should have_ability([:admin, :index, :create], for: Enterprise) end end end