Fixing up the specs

This commit is contained in:
Will Marshall
2014-03-12 17:17:07 +11:00
parent 35bd1257d9
commit 7c50e1a41d
4 changed files with 10 additions and 12 deletions

View File

@@ -6,7 +6,7 @@ angular.module("Checkout").controller "CheckoutCtrl", ($scope, $rootScope, order
# Our shipping_methods comes through as a hash like so: {id: requires_shipping_address}
# Here we default to the first shipping method if none is selected
$scope.order.shipping_method_id ||= Object.keys(order.shipping_methods)[0]
$scope.order.ship_address_same_as_billing ||= true
$scope.order.ship_address_same_as_billing = true if $scope.order.ship_address_same_as_billing == null
$scope.require_ship_address = $scope.order.shipping_methods[$scope.order.shipping_method_id]
$scope.shippingMethodChanged = ->
@@ -16,3 +16,4 @@ angular.module("Checkout").controller "CheckoutCtrl", ($scope, $rootScope, order
$scope.purchase = (event)->
event.preventDefault()
checkout.submit()