4977 add ability to delete unused item categories#5197
Conversation
…8' into rework_donation_site_import_#4978
…ank, phone is not mandatory, fixed tests
…8' into rework_donation_site_import_#4978
…8' into rework_donation_site_import_#4978
…inor requested changes
cielf
left a comment
There was a problem hiding this comment.
Thanks for taking a stab at this!
We've got a problem that needs to be addressed, though.
I was playing around with adding and deleting item categories from items, and managed to get to the following situation:
Here we have an item category, with items in it, that nonetheless shows "delete".
It looks like if I create a new item category, then assign an item (these had had an item category already) to it, it is still showing delete.
It shouldn't.
Hope that helps!
|
I'll take a look, thank you. |
| end | ||
| end | ||
|
|
||
| describe "ItemCategories", type: :request do |
There was a problem hiding this comment.
Can this be moved under spec/requests please?
There was a problem hiding this comment.
Yes, sure. It's done!
dorner
left a comment
There was a problem hiding this comment.
I think you moved the wrong spec. :) The one that has type: :request should be in spec/requests.
| it { is_expected.to be_versioned } | ||
| end | ||
|
|
||
| describe "item categories", type: :request do |
There was a problem hiding this comment.
This needs to be in spec/requests, not spec/models.
| let(:partner_group) { create(:partner_group, item_categories: [item_category]) } | ||
|
|
||
| before do | ||
| partner_group |
There was a problem hiding this comment.
Non-blocking: A better way to do this would be to change let(:partner_group) to let!(:partner_group) so you don't need to call it out this way.
There was a problem hiding this comment.
Thank you for advice!
|
@someykoku: Your PR |

Resolves #4977 add ability to delete unused item categories
Description
Type of change
How Has This Been Tested?
Screenshots