Skip to content

Commit

Permalink
Test localstorage with real item
Browse files Browse the repository at this point in the history
  • Loading branch information
jsor committed Mar 4, 2015
1 parent f765ffc commit ddbadb0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions test/store/localStorage-test.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
var assert = require('chai').assert;
var sinon = require('sinon');
var localStorage = require('../../store/localStorage');
var createItem = typeof window !== 'undefined' ? window.carty.item : require('../../item');

describe("storage/localStorage()", function() {
var mockLocalStorage = {
Expand Down Expand Up @@ -30,7 +31,7 @@ describe("storage/localStorage()", function() {

var storage = localStorage(null, mockLocalStorage);

storage.add(null, function() { return []; });
storage.add(null, function() { return [createItem('Item')]; });

mock.verify();
});
Expand All @@ -40,7 +41,7 @@ describe("storage/localStorage()", function() {

var storage = localStorage(null, mockLocalStorage);

storage.remove(null, function() { return []; });
storage.remove(null, function() { return [createItem('Item')]; });

mock.verify();
});
Expand Down

0 comments on commit ddbadb0

Please sign in to comment.