2016-07-04 22:58:10 +08:00
|
|
|
import {it, inject, addProviders} from "@angular/core/testing";
|
2016-05-11 05:19:46 +08:00
|
|
|
import {BaseRequestOptions, Http} from "@angular/http";
|
|
|
|
import {MockBackend} from "@angular/http/testing";
|
|
|
|
import {provide} from "@angular/core";
|
|
|
|
import "rxjs/Rx";
|
|
|
|
import {NetworkService} from "../model/network/network.service";
|
|
|
|
import {GalleryService} from "./gallery.service";
|
|
|
|
|
|
|
|
|
|
|
|
describe('GalleryService', () => {
|
|
|
|
|
2016-07-04 22:58:10 +08:00
|
|
|
beforeEach(() => {
|
|
|
|
addProviders([
|
|
|
|
MockBackend,
|
|
|
|
BaseRequestOptions,
|
|
|
|
provide(Http, {
|
|
|
|
useFactory: (backend, options) => {
|
|
|
|
return new Http(backend, options);
|
|
|
|
}, deps: [MockBackend, BaseRequestOptions]
|
|
|
|
}),
|
|
|
|
NetworkService,
|
|
|
|
GalleryService
|
|
|
|
]);
|
|
|
|
});
|
2016-05-11 05:19:46 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
it('placeholder test', inject([], () => {
|
|
|
|
expect(true).toBe(true);
|
|
|
|
}));
|
|
|
|
|
|
|
|
});
|