diff --git a/test/spec/localStorageSpec.js b/test/spec/localStorageSpec.js index fef396e..95c463a 100644 --- a/test/spec/localStorageSpec.js +++ b/test/spec/localStorageSpec.js @@ -150,6 +150,19 @@ describe('localStorageService', function() { ); }); + it('should be able to chain functions in the config phase', function() { + module(function(localStorageServiceProvider) { + localStorageServiceProvider + .setPrefix('chain') + .setNotify(false, true) + .setStorageType('session'); + }); + inject(function(localStorageService) { + expect(localStorageService.deriveKey('foo')).toEqual('chain.foo'); + expect(localStorageService.getStorageType()).toEqual('session'); + }); + }); + it('should be able to return the derive key', function() { module(setPrefix('myApp')); inject(function(localStorageService) {