Skip to content

Commit

Permalink
Update test to ensure JSON-encoded strings work
Browse files Browse the repository at this point in the history
  • Loading branch information
danielstjules committed Jul 26, 2016
1 parent c9fdbbe commit 31baa28
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,18 @@ describe('CrossStorageClient', function() {
})['catch'](done);
});

it('can set JSON objects as the value', function(done) {
var key = 'key1';
var str = JSON.stringify({foo: 'bar'});

storage.onConnect()
.then(setGet(key, str))
.then(function(res) {
expect(res).to.eql(str);
done();
})['catch'](done);
});

it('can overwrite existing values', function(done) {
var key = 'key1';
var value = 'new';
Expand Down

0 comments on commit 31baa28

Please sign in to comment.