diff --git a/app/assets/javascripts/darkswarm/directives/on_hand.js.coffee b/app/assets/javascripts/darkswarm/directives/on_hand.js.coffee index 1086363676..8ad5a8748a 100644 --- a/app/assets/javascripts/darkswarm/directives/on_hand.js.coffee +++ b/app/assets/javascripts/darkswarm/directives/on_hand.js.coffee @@ -1,6 +1,7 @@ Darkswarm.directive "ofnOnHand", -> restrict: 'A' require: "ngModel" + scope: true link: (scope, elem, attr, ngModel) -> # In cases where this field gets its value from the HTML element rather than the model, diff --git a/spec/features/consumer/shopping/cart_spec.rb b/spec/features/consumer/shopping/cart_spec.rb index d28764475e..95a51ce1ec 100644 --- a/spec/features/consumer/shopping/cart_spec.rb +++ b/spec/features/consumer/shopping/cart_spec.rb @@ -176,7 +176,7 @@ feature "full-page cart", js: true do end describe "with insufficient stock available" do - xit "prevents user from entering invalid values" do + it "prevents user from entering invalid values" do add_product_to_cart order, product_with_fee variant.update_attributes!(on_hand: 2, on_demand: false)