Skip to content

Commit 16523c3

Browse files
[DSpace#1816][CST-6565] Clearified expectation of test
1 parent 3cc4b96 commit 16523c3

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/app/shared/cookies/browser-klaro.service.spec.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,10 +269,14 @@ describe('BrowserKlaroService', () => {
269269
spyOn((service as any), 'initializeUser');
270270
spyOn(service, 'translateConfiguration');
271271
});
272-
it('should not filter any configuration', () => {
272+
it('should not filter googleAnalytics when servicesToHide are empty', () => {
273273
const filteredConfig = (service as any).filterConfigServices([]);
274274
expect(filteredConfig).toContain(jasmine.objectContaining({name: googleAnalytics}));
275275
});
276+
it('should filter services using names passed as servicesToHide', () => {
277+
const filteredConfig = (service as any).filterConfigServices([googleAnalytics]);
278+
expect(filteredConfig).not.toContain(jasmine.objectContaining({name: googleAnalytics}));
279+
});
276280
it('should have been initialized with googleAnalytics', () => {
277281
service.initialize();
278282
expect(service.klaroConfig.services).toContain(jasmine.objectContaining({name: googleAnalytics}));

0 commit comments

Comments
 (0)