diff --git a/ng2-components/ng2-alfresco-webscript/src/assets/AlfrescoSettingsService.service.mock.ts b/ng2-components/ng2-alfresco-webscript/src/assets/AlfrescoSettingsService.service.mock.ts deleted file mode 100644 index 354b652ed8..0000000000 --- a/ng2-components/ng2-alfresco-webscript/src/assets/AlfrescoSettingsService.service.mock.ts +++ /dev/null @@ -1,36 +0,0 @@ -/*! - * @license - * Copyright 2016 Alfresco Software, Ltd. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { Injectable } from '@angular/core'; - -@Injectable() -export class AlfrescoSettingsServiceMock { - - static DEFAULT_HOST_ADDRESS: string = 'fakehost'; - - private providers: string[] = ['ECM', 'BPM']; - - private _host: string = AlfrescoSettingsServiceMock.DEFAULT_HOST_ADDRESS; - - public get ecmHost(): string { - return this._host; - } - - getProviders(): string [] { - return this.providers; - } -} diff --git a/ng2-components/ng2-alfresco-webscript/src/webscript.component.spec.ts b/ng2-components/ng2-alfresco-webscript/src/webscript.component.spec.ts index 66459ddc05..bdade46782 100644 --- a/ng2-components/ng2-alfresco-webscript/src/webscript.component.spec.ts +++ b/ng2-components/ng2-alfresco-webscript/src/webscript.component.spec.ts @@ -18,7 +18,6 @@ import { describe, expect, it, inject, beforeEachProviders, beforeEach, afterEach, xit } from '@angular/core/testing'; import { TestComponentBuilder } from '@angular/compiler/testing'; import { WebscriptComponent } from '../src/webscript.component'; -import { AlfrescoSettingsServiceMock } from '../src/assets/AlfrescoSettingsService.service.mock'; import { AlfrescoAuthenticationService, AlfrescoSettingsService } from 'ng2-alfresco-core'; @@ -30,7 +29,7 @@ describe('Test ng2-alfresco-webscript', () => { beforeEachProviders(() => { return [ - {provide: AlfrescoSettingsService, useClass: AlfrescoSettingsServiceMock}, + AlfrescoSettingsService, AlfrescoAuthenticationService ]; }); @@ -86,7 +85,7 @@ describe('Test ng2-alfresco-webscript', () => { component.ngOnChanges().then(() => { webscriptComponentFixture.detectChanges(); let request = jasmine.Ajax.requests.mostRecent(); - expect(request.url).toBe('fakehost/alfresco/service/sample/folder/Company%20Home'); + expect(request.url).toBe('http://localhost:8080/alfresco/service/sample/folder/Company%20Home'); done(); });