diff --git a/src/core/public/http/http_service.test.ts b/src/core/public/http/http_service.test.ts index c6301b26d1d1..5671064e4c52 100644 --- a/src/core/public/http/http_service.test.ts +++ b/src/core/public/http/http_service.test.ts @@ -83,7 +83,7 @@ describe('#setup()', () => { expect(setupResult.basePath.get()).toEqual(''); }); - it('setup basePath with workspaceId provided in window.location.href and workspace feature enabled', () => { + it('setup basePath with workspaceId provided in window.location.href', () => { const windowSpy = jest.spyOn(window, 'window', 'get'); windowSpy.mockImplementation( () => @@ -94,43 +94,12 @@ describe('#setup()', () => { } as any) ); const injectedMetadata = injectedMetadataServiceMock.createSetupContract(); - injectedMetadata.getPlugins.mockReturnValueOnce([ - { - id: 'workspace', - plugin: { - id: 'workspace', - configPath: '', - requiredPlugins: [], - optionalPlugins: [], - requiredEnginePlugins: {}, - requiredBundles: [], - }, - }, - ]); const fatalErrors = fatalErrorsServiceMock.createSetupContract(); const httpService = new HttpService(); const setupResult = httpService.setup({ fatalErrors, injectedMetadata }); expect(setupResult.basePath.get()).toEqual('/w/workspaceId'); windowSpy.mockRestore(); }); - - it('setup basePath with workspaceId provided in window.location.href but workspace feature disabled', () => { - const windowSpy = jest.spyOn(window, 'window', 'get'); - windowSpy.mockImplementation( - () => - ({ - location: { - href: 'http://localhost/w/workspaceId/app', - }, - } as any) - ); - const injectedMetadata = injectedMetadataServiceMock.createSetupContract(); - const fatalErrors = fatalErrorsServiceMock.createSetupContract(); - const httpService = new HttpService(); - const setupResult = httpService.setup({ fatalErrors, injectedMetadata }); - expect(setupResult.basePath.get()).toEqual(''); - windowSpy.mockRestore(); - }); }); describe('#stop()', () => {