sure I get that. Still I find it might be worth it to warn users things
didn't happen exactly as they wanted.


On Tue, Jul 9, 2013 at 2:55 AM, Ryan Bigg <notifications@github.com> wrote:

> In core/app/models/spree/order_inventory.rb:
>
> >          variant_unit.state == 'shipped'
> >        end.sort_by(&:state)
> >
> >        removed_quantity = 0
> >
> > +      if shipment_units.count < quantity
> > +        raise "Shipment does not contain enough deletable inventory_units"
>
> These two pending tests were added in a56a4cc<https://github.com/spree/spree/commit/a56a4cc2>.
> Maybe @BDQ <https://github.com/BDQ> has an idea of where to go in this
> case?
>
> It doesn't make sense to me to even have this check here because it
> iterates through shipment_units, removing as many as quantity specifies.
> So if there are 3 shipment_units, but quantity is 4, I can't see a
> situation where it would attempt to remove more than those 3. It seems
> impossible. Do you understand?
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/spree/spree/pull/3334/files#r5082719>
> .
>



-- 
Washington L Braga Jr
Developer
Spree Commerce, Inc.