mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 01:54:15 +00:00
[#1816][CST-6565] Clearified expectation of test
This commit is contained in:
@@ -269,10 +269,14 @@ describe('BrowserKlaroService', () => {
|
|||||||
spyOn((service as any), 'initializeUser');
|
spyOn((service as any), 'initializeUser');
|
||||||
spyOn(service, 'translateConfiguration');
|
spyOn(service, 'translateConfiguration');
|
||||||
});
|
});
|
||||||
it('should not filter any configuration', () => {
|
it('should not filter googleAnalytics when servicesToHide are empty', () => {
|
||||||
const filteredConfig = (service as any).filterConfigServices([]);
|
const filteredConfig = (service as any).filterConfigServices([]);
|
||||||
expect(filteredConfig).toContain(jasmine.objectContaining({name: googleAnalytics}));
|
expect(filteredConfig).toContain(jasmine.objectContaining({name: googleAnalytics}));
|
||||||
});
|
});
|
||||||
|
it('should filter services using names passed as servicesToHide', () => {
|
||||||
|
const filteredConfig = (service as any).filterConfigServices([googleAnalytics]);
|
||||||
|
expect(filteredConfig).not.toContain(jasmine.objectContaining({name: googleAnalytics}));
|
||||||
|
});
|
||||||
it('should have been initialized with googleAnalytics', () => {
|
it('should have been initialized with googleAnalytics', () => {
|
||||||
service.initialize();
|
service.initialize();
|
||||||
expect(service.klaroConfig.services).toContain(jasmine.objectContaining({name: googleAnalytics}));
|
expect(service.klaroConfig.services).toContain(jasmine.objectContaining({name: googleAnalytics}));
|
||||||
|
Reference in New Issue
Block a user