Basics in place, about to rework karma config

This commit is contained in:
Will Marshall
2014-04-08 12:58:37 +10:00
parent fbcf06f5f5
commit f6c173d0de
17 changed files with 254 additions and 69 deletions

View File

@@ -5,30 +5,7 @@ describe "CheckoutCtrl", ->
beforeEach ->
module("Darkswarm")
order =
id: 3102
shipping_method_id: "7"
ship_address_same_as_billing: true
payment_method_id: null
shipping_methods:
7:
require_ship_address: true
price: 0.0
25:
require_ship_address: false
price: 13
order = {}
inject ($controller) ->
scope = {}
ctrl = $controller 'CheckoutCtrl', {$scope: scope, order: order}
it 'Gets the ship address automatically', ->
expect(scope.require_ship_address).toEqual true
it 'Gets the current shipping price', ->
expect(scope.shippingPrice()).toEqual 0.0
scope.order.shipping_method_id = 25
expect(scope.shippingPrice()).toEqual 13
ctrl = $controller 'CheckoutCtrl', {$scope: scope, Order: order}