This commit is contained in:
Ivan Socolsky 2017-08-15 10:05:23 -03:00
parent 0453048784
commit ccf6199504
No known key found for this signature in database
GPG Key ID: FAECE6A05FAA4F56
1 changed files with 10 additions and 10 deletions

View File

@ -15,7 +15,7 @@ describe('Storage Service', () => {
providers: [
PersistenceProvider,
{ provide: Logger, useValue: new Logger(LoggerLevel.DEBUG) },
{ provide: ISTORAGE, useClass: FileStorage, deps: [Logger, Platform] },
{ provide: ISTORAGE, useClass: RamStorage, deps: [Logger, Platform] },
Platform,
]
});
@ -40,14 +40,14 @@ describe('Storage Service', () => {
.then(done);
});
// it('should fail to create a profile when one already exists', () => {
// let p = { name: 'My profile' };
// service.storeNewProfile(p)
// .then(() => {
// return service.storeNewProfile(p);
// }).catch((err) => {
// expect(err.message).toEqual('Key already exists');
// });
// });
it('should fail to create a profile when one already exists', () => {
let p = { name: 'My profile' };
service.storeNewProfile(p)
.then(() => {
return service.storeNewProfile(p);
}).catch((err) => {
expect(err.message).toEqual('Key already exists');
});
});
});
});