-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Delete portfolio items #82
Conversation
@lgalis please take a look |
a454542
to
6ac9ce7
Compare
@gmcculloug @mkanoor Please review |
6ac9ce7
to
1f03055
Compare
|
||
before do | ||
allow(ServiceCatalog::ServicePlans).to receive(:new).with(portfolio_item.id.to_s).and_return(svc_object) | ||
# Encoded Header: { 'identity' => { 'is_org_admin':false, 'org_id':111 } } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@syncrou
https://github.com/ManageIQ/service_portal-api/blob/76445a3e79b3c8eaeb97aba2bb85858b8f4ea607/spec/support/service_spec_helper.rb#L6
We should use the functions in the spec_helper for the admin and user auth
@@ -0,0 +1,51 @@ | |||
module ServiceCatalog |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@syncrou
What is this file, is it a spec or a support file. We already have a spec file in
https://github.com/ManageIQ/service_portal-api/blob/master/spec/services/service_catalog/service_offering_spec.rb
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Support file
Same as my comment above.
Any spec calling create
on PortfolioItem
was causing me lots of pain. This allows those requests to work with real data see line 17 here: https://github.com/ManageIQ/service_portal-api/pull/82/files#diff-da5419dcb98a21e5282dcb098c832fea
@@ -0,0 +1,24 @@ | |||
class TopologicalInventory |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@syncrou Is this file also incorrectly named?
We have this https://github.com/ManageIQ/service_portal-api/blob/master/spec/lib/topological_inventory_spec.rb
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No it isn't, it's a support file that allows us to call the TopologicalInventory
class with out making a request to real Topological inventory. This file helped removing Mocking that was happening for any ServiceOffering
instance. I'm going to pull this class out of the PR and move all these spec changes into their own PR to help clarify what I was doing here.
Closed in favor of #84 |
Added selection of destination project for order modal
Create a new route for deleting Portfolio Items
Add spec coverage for portfolio items