WIP: BOM Refactor, adding for_line_items action to enterprises controller

This commit is contained in:
Rob Harrington
2015-11-04 15:02:29 +11:00
parent 625e0888ea
commit ae7e744644
14 changed files with 79 additions and 64 deletions

View File

@@ -515,6 +515,21 @@ module Admin
end
end
describe "for_line_items" do
let!(:user) { create(:user) }
let!(:enterprise) { create(:enterprise, sells: 'any', owner: user) }
before do
# As a user with permission
controller.stub spree_current_user: user
end
it "initializes permissions with the existing OrderCycle" do
# expect(controller).to receive(:render_as_json).with([enterprise], {ams_prefix: 'basic', spree_current_user: user})
spree_get :for_line_items, format: :json
end
end
describe "index" do
context "as super admin" do
let(:super_admin) { create(:admin_user) }