Fixed non-functional category delete
Adds specs
Merge pull request #943 from opf/fix/500_on_category_destroy_1390