Changeset View
Changeset View
Standalone View
Standalone View
src/app/_shared/profile/profile.component.spec.ts
- This file was moved from src/app/profile/profile.component.spec.ts.
Show All 36 Lines | beforeEach(() => { | ||||
}; | }; | ||||
const routerStub = {}; | const routerStub = {}; | ||||
const activatedRouteStub = { | const activatedRouteStub = { | ||||
params: Observable.of({'id': 1}) | params: Observable.of({'id': 1}) | ||||
}; | }; | ||||
const authenticationServiceStub = { | const authenticationServiceStub = { | ||||
token: 'token' | token: 'token' | ||||
}; | }; | ||||
const reasonServiceStub = {} | const reasonServiceStub = {}; | ||||
const profileServiceStub = { | const profileServiceStub = { | ||||
getUser: (id: number) => { | getUser: (id: number) => { | ||||
if (id !== 1) { | if (id !== 1) { | ||||
throw new Error('Requests for users other than with Id 1 not implemented'); | throw new Error('Requests for users other than with Id 1 not implemented'); | ||||
} | } | ||||
return Observable.of( | return Observable.of( | ||||
new Author(1, 'Test User', null, 'test', false) | new Author(1, 'Test User', null, 'test', false) | ||||
▲ Show 20 Lines • Show All 86 Lines • Show Last 20 Lines |