Finishing off the merge with localStorage refactoring with sekrets

This commit is contained in:
Will Marshall
2014-06-04 17:22:10 +10:00
parent 3c21ce8d99
commit 69e5459afd
3 changed files with 21 additions and 7 deletions

View File

@@ -13,7 +13,7 @@ describe "CheckoutCtrl", ->
bindFieldsToLocalStorage: ->
order:
id: 1
public: "public"
email: "public"
secrets:
card_number: "this is a secret"
@@ -46,9 +46,6 @@ describe "CheckoutCtrl", ->
it "is disabled", ->
expect(scope.enabled).toEqual false
it "binds order to local storage", ->
expect(localStorage.getItem("order_#{Order.order.id}#{Order.order.user_id}")).toMatch Order.order.public
it "does not store secrets in local storage", ->
keys = (localStorage.key(i) for i in [0..localStorage.length])
for key in keys