Skip to content

Instantly share code, notes, and snippets.

@mbj
Created May 15, 2015 23:21
Show Gist options
  • Save mbj/184a2f8b15ba6fb8948e to your computer and use it in GitHub Desktop.
Save mbj/184a2f8b15ba6fb8948e to your computer and use it in GitHub Desktop.
errors on spree master hidden by generic exception rescue in API
bundle exec rspec spec/features/admin/orders/order_details_spec.rb
Instance method "open" is already defined in Object, use generic helper instead or set StateMachines::Machine.ignore_method_conflicts = true.
...........*...FF.F...FF.......
Pending:
Order Details as Admin Shipment edit page splitting to location should warn you if you have not selected a location or shipment
# Not yet implemented
# ./spec/features/admin/orders/order_details_spec.rb:188
Failures:
1) Order Details as Admin Shipment edit page splitting to location there is enough stock at the other location should not split anything if the input quantity is garbage
Failure/Error: Unable to find matching line from backtrace
ArgumentError:
ArgumentError
# /home/ubuntu/spree/core/app/models/spree/shipment.rb:345:in `transfer_to_location'
# /home/ubuntu/spree/api/app/controllers/spree/api/v1/shipments_controller.rb:78:in `transfer_to_location'
2) Order Details as Admin Shipment edit page splitting to location there is enough stock at the other location should not allow less than or equal to zero qty
Failure/Error: Unable to find matching line from backtrace
ArgumentError:
ArgumentError
# /home/ubuntu/spree/core/app/models/spree/shipment.rb:345:in `transfer_to_location'
# /home/ubuntu/spree/api/app/controllers/spree/api/v1/shipments_controller.rb:78:in `transfer_to_location'
3) Order Details as Admin Shipment edit page splitting to location there is not enough stock at the other location and it cannot backorder should not allow me to split stock
Failure/Error: Unable to find matching line from backtrace
ActiveRecord::RecordInvalid:
Validation failed: Count on hand must be greater than or equal to 0
# /home/ubuntu/spree/core/app/models/spree/stock_item.rb:35:in `block in adjust_count_on_hand'
# /home/ubuntu/spree/core/app/models/spree/stock_item.rb:31:in `adjust_count_on_hand'
# /home/ubuntu/spree/core/app/models/spree/stock_movement.rb:26:in `update_stock_item_quantity'
# /home/ubuntu/spree/core/app/models/spree/stock_location.rb:80:in `move'
# /home/ubuntu/spree/core/app/models/spree/stock_location.rb:76:in `unstock'
# /home/ubuntu/spree/core/app/models/spree/order_inventory.rb:76:in `add_to_shipment'
# /home/ubuntu/spree/core/app/models/spree/order_inventory.rb:25:in `verify'
# /home/ubuntu/spree/core/app/models/spree/line_item.rb:123:in `update_inventory'
# /home/ubuntu/spree/core/app/models/spree/order_contents.rb:84:in `add_to_line_item'
# /home/ubuntu/spree/core/app/models/spree/order_contents.rb:10:in `add'
# /home/ubuntu/spree/core/app/models/spree/shipment.rb:352:in `block in transfer_to_location'
# /home/ubuntu/spree/core/app/models/spree/shipment.rb:348:in `transfer_to_location'
# /home/ubuntu/spree/api/app/controllers/spree/api/v1/shipments_controller.rb:78:in `transfer_to_location'
4) Order Details as Admin Shipment edit page splitting to shipment receiving shipment can not backorder should not allow a split if the receiving shipment qty plus the incoming is greater than the count_on_hand
Failure/Error: Unable to find matching line from backtrace
ActiveRecord::RecordInvalid:
Validation failed: Count on hand must be greater than or equal to 0
# /home/ubuntu/spree/core/app/models/spree/stock_item.rb:35:in `block in adjust_count_on_hand'
# /home/ubuntu/spree/core/app/models/spree/stock_item.rb:31:in `adjust_count_on_hand'
# /home/ubuntu/spree/core/app/models/spree/stock_movement.rb:26:in `update_stock_item_quantity'
# /home/ubuntu/spree/core/app/models/spree/stock_location.rb:80:in `move'
# /home/ubuntu/spree/core/app/models/spree/stock_location.rb:76:in `unstock'
# /home/ubuntu/spree/core/app/models/spree/order_inventory.rb:76:in `add_to_shipment'
# /home/ubuntu/spree/core/app/models/spree/order_inventory.rb:25:in `verify'
# /home/ubuntu/spree/core/app/models/spree/line_item.rb:123:in `update_inventory'
# /home/ubuntu/spree/core/app/models/spree/order_contents.rb:84:in `add_to_line_item'
# /home/ubuntu/spree/core/app/models/spree/order_contents.rb:10:in `add'
# /home/ubuntu/spree/core/app/models/spree/shipment.rb:370:in `block in transfer_to_shipment'
# /home/ubuntu/spree/core/app/models/spree/shipment.rb:368:in `transfer_to_shipment'
# /home/ubuntu/spree/api/app/controllers/spree/api/v1/shipments_controller.rb:84:in `transfer_to_shipment'
5) Order Details as Admin Shipment edit page splitting to shipment receiving shipment can not backorder should not allow a shipment to split stock to itself
Failure/Error: Unable to find matching line from backtrace
ArgumentError:
ArgumentError
# /home/ubuntu/spree/core/app/models/spree/shipment.rb:365:in `transfer_to_shipment'
# /home/ubuntu/spree/api/app/controllers/spree/api/v1/shipments_controller.rb:84:in `transfer_to_shipment'
Finished in 2 minutes 30.7 seconds (files took 4.4 seconds to load)
31 examples, 5 failures, 1 pending
Failed examples:
rspec ./spec/features/admin/orders/order_details_spec.rb:242 # Order Details as Admin Shipment edit page splitting to location there is enough stock at the other location should not split anything if the input quantity is garbage
rspec ./spec/features/admin/orders/order_details_spec.rb:257 # Order Details as Admin Shipment edit page splitting to location there is enough stock at the other location should not allow less than or equal to zero qty
rspec ./spec/features/admin/orders/order_details_spec.rb:301 # Order Details as Admin Shipment edit page splitting to location there is not enough stock at the other location and it cannot backorder should not allow me to split stock
rspec ./spec/features/admin/orders/order_details_spec.rb:384 # Order Details as Admin Shipment edit page splitting to shipment receiving shipment can not backorder should not allow a split if the receiving shipment qty plus the incoming is greater than the count_on_hand
rspec ./spec/features/admin/orders/order_details_spec.rb:406 # Order Details as Admin Shipment edit page splitting to shipment receiving shipment can not backorder should not allow a shipment to split stock to itself
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment