Config and login
Change-Id: I81ffb9b8097620cb7870beaf1b1b315945eebec0
diff --git a/src/app/hello.spec.ts b/src/app/hello.spec.ts
index 7e3b2cc..91b3f1a 100644
--- a/src/app/hello.spec.ts
+++ b/src/app/hello.spec.ts
@@ -2,12 +2,26 @@
import {HelloComponent} from './hello';
import {TestBed, async} from '@angular/core/testing';
+import {StyleConfig} from './config/style.config';
+import { Http, BaseRequestOptions } from '@angular/http';
+import { MockBackend } from '@angular/http/testing';
describe('hello component', () => {
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [
HelloComponent
+ ],
+ providers: [
+ {
+ provide: Http,
+ useFactory: (mockBackend, options) => {
+ return new Http(mockBackend, options);
+ },
+ deps: [MockBackend, BaseRequestOptions]
+ },
+ MockBackend,
+ BaseRequestOptions
]
});
TestBed.compileComponents();
@@ -17,6 +31,6 @@
const fixture = TestBed.createComponent(HelloComponent);
fixture.detectChanges();
const hello = fixture.nativeElement;
- expect(hello.querySelector('h1').textContent).toBe('Hello World!');
+ expect(hello.querySelector('h1').textContent).toBe(`Hello ${StyleConfig.projectName}!`);
});
});