Browse Source

Tests fixed.

pull/356/head
Sebastian Stehle 8 years ago
parent
commit
ba4be11ad2
  1. 8
      src/Squidex/app/shared/state/schemas.state.spec.ts

8
src/Squidex/app/shared/state/schemas.state.spec.ts

@ -81,7 +81,7 @@ describe('SchemasState', () => {
expect(schemasState.snapshot.schemas.values).toEqual(oldSchemas); expect(schemasState.snapshot.schemas.values).toEqual(oldSchemas);
expect(schemasState.snapshot.isLoaded).toBeTruthy(); expect(schemasState.snapshot.isLoaded).toBeTruthy();
expect(schemasState.snapshot.categories).toEqual({ 'category1': false, 'category2': false }); expect(schemasState.snapshot.categories).toEqual({ 'category1': false, 'category2': false, '': true });
schemasService.verifyAll(); schemasService.verifyAll();
}); });
@ -95,7 +95,7 @@ describe('SchemasState', () => {
expect(schemasState.snapshot.schemas.values).toEqual(oldSchemas); expect(schemasState.snapshot.schemas.values).toEqual(oldSchemas);
expect(schemasState.snapshot.isLoaded).toBeTruthy(); expect(schemasState.snapshot.isLoaded).toBeTruthy();
expect(schemasState.snapshot.categories).toEqual({ 'category1': false, 'category2': false, 'category3': true }); expect(schemasState.snapshot.categories).toEqual({ 'category1': false, 'category2': false, 'category3': true, '': true });
schemasService.verifyAll(); schemasService.verifyAll();
}); });
@ -123,13 +123,13 @@ describe('SchemasState', () => {
it('should add category', () => { it('should add category', () => {
schemasState.addCategory('category3'); schemasState.addCategory('category3');
expect(schemasState.snapshot.categories).toEqual({ 'category1': false, 'category2': false, 'category3': true }); expect(schemasState.snapshot.categories).toEqual({ 'category1': false, 'category2': false, 'category3': true, '': true });
}); });
it('should remove category', () => { it('should remove category', () => {
schemasState.removeCategory('category1'); schemasState.removeCategory('category1');
expect(schemasState.snapshot.categories).toEqual({ 'category2': false }); expect(schemasState.snapshot.categories).toEqual({ 'category2': false, '': true });
}); });
it('should return schema on select and reload when already loaded', () => { it('should return schema on select and reload when already loaded', () => {

Loading…
Cancel
Save