mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
Fix upload unit test Http dependency
This commit is contained in:
@@ -24,6 +24,7 @@ import { TranslationMock } from '../assets/translation.service.mock';
|
||||
import { UploadServiceMock } from '../assets/upload.service.mock';
|
||||
import { UploadService } from '../services/upload.service';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
import { HTTP_PROVIDERS } from '@angular/http';
|
||||
|
||||
describe('FileUploadDialog', () => {
|
||||
|
||||
@@ -32,6 +33,7 @@ describe('FileUploadDialog', () => {
|
||||
|
||||
beforeEachProviders(() => {
|
||||
return [
|
||||
HTTP_PROVIDERS,
|
||||
{ provide: AlfrescoSettingsService, useClass: AlfrescoSettingsService },
|
||||
{ provide: AlfrescoAuthenticationService, useClass: AlfrescoAuthenticationService },
|
||||
{ provide: AlfrescoTranslationService, useClass: TranslationMock },
|
||||
|
@@ -24,6 +24,7 @@ import { UploadServiceMock } from '../assets/upload.service.mock';
|
||||
import { UploadService } from '../services/upload.service';
|
||||
import { AlfrescoApiMock } from '../assets/AlfrescoApi.mock';
|
||||
import { AlfrescoSettingsServiceMock } from '../assets/AlfrescoSettingsService.service.mock';
|
||||
import { HTTP_PROVIDERS } from '@angular/http';
|
||||
|
||||
declare var AlfrescoApi: any;
|
||||
|
||||
@@ -38,6 +39,7 @@ describe('AlfrescoUploadButton', () => {
|
||||
|
||||
beforeEachProviders(() => {
|
||||
return [
|
||||
HTTP_PROVIDERS,
|
||||
{ provide: AlfrescoSettingsService, useClass: AlfrescoSettingsServiceMock },
|
||||
{ provide: AlfrescoAuthenticationService, useClass: AlfrescoAuthenticationService },
|
||||
{ provide: AlfrescoTranslationService, useClass: TranslationMock },
|
||||
|
@@ -24,6 +24,7 @@ import { TranslationMock } from '../assets/translation.service.mock';
|
||||
import { UploadServiceMock } from '../assets/upload.service.mock';
|
||||
import { UploadService } from '../services/upload.service';
|
||||
import { AlfrescoApiMock } from '../assets/AlfrescoApi.mock';
|
||||
import { HTTP_PROVIDERS } from '@angular/http';
|
||||
|
||||
declare var AlfrescoApi: any;
|
||||
|
||||
@@ -37,6 +38,7 @@ describe('AlfrescoUploadDragArea', () => {
|
||||
|
||||
beforeEachProviders(() => {
|
||||
return [
|
||||
HTTP_PROVIDERS,
|
||||
{ provide: AlfrescoSettingsService, useClass: AlfrescoSettingsServiceMock },
|
||||
{ provide: AlfrescoAuthenticationService, useClass: AlfrescoAuthenticationService },
|
||||
{ provide: AlfrescoTranslationService, useClass: TranslationMock },
|
||||
|
@@ -21,6 +21,7 @@ import { FileModel } from './../models/file.model';
|
||||
import { AlfrescoSettingsService, AlfrescoAuthenticationService } from 'ng2-alfresco-core';
|
||||
import { AlfrescoSettingsServiceMock } from '../assets/AlfrescoSettingsService.service.mock';
|
||||
import { AlfrescoApiMock } from '../assets/AlfrescoApi.mock';
|
||||
import { HTTP_PROVIDERS } from '@angular/http';
|
||||
|
||||
declare var AlfrescoApi: any;
|
||||
declare let jasmine: any;
|
||||
@@ -66,6 +67,7 @@ describe('AlfrescoUploadService', () => {
|
||||
|
||||
beforeEachProviders(() => {
|
||||
return [
|
||||
HTTP_PROVIDERS,
|
||||
{ provide: AlfrescoSettingsService, useClass: AlfrescoSettingsServiceMock },
|
||||
{ provide: AlfrescoAuthenticationService, useClass: AlfrescoAuthenticationService },
|
||||
{ provide: UploadService, useClass: MockUploadService }
|
||||
|
Reference in New Issue
Block a user