diff options
author | 杨宇千 <crupest@outlook.com> | 2019-03-11 19:52:29 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-11 19:52:29 +0800 |
commit | 6f02dc7094d1304501e7ffd6c39ecf89369202c7 (patch) | |
tree | d031e2d14933574de04c892accb59560bdbea395 /Timeline/ClientApp/src/app/todo/todo-service/todo.service.spec.ts | |
parent | 028af6f786ac2664d301614d57bbff053c3dc9c0 (diff) | |
parent | 5d1d884635713278a792f99bb32cbe6d7471b0df (diff) | |
download | timeline-6f02dc7094d1304501e7ffd6c39ecf89369202c7.tar.gz timeline-6f02dc7094d1304501e7ffd6c39ecf89369202c7.tar.bz2 timeline-6f02dc7094d1304501e7ffd6c39ecf89369202c7.zip |
Merge pull request #11 from crupest/7-user-route
Use named route in user dialog.
Diffstat (limited to 'Timeline/ClientApp/src/app/todo/todo-service/todo.service.spec.ts')
-rw-r--r-- | Timeline/ClientApp/src/app/todo/todo-service/todo.service.spec.ts | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Timeline/ClientApp/src/app/todo/todo-service/todo.service.spec.ts b/Timeline/ClientApp/src/app/todo/todo-service/todo.service.spec.ts index b0b35f7b..679dc8b7 100644 --- a/Timeline/ClientApp/src/app/todo/todo-service/todo.service.spec.ts +++ b/Timeline/ClientApp/src/app/todo/todo-service/todo.service.spec.ts @@ -3,7 +3,8 @@ import { HttpClientTestingModule, HttpTestingController } from '@angular/common/ import { toArray } from 'rxjs/operators'; import { TodoItem } from '../todo-item'; -import { TodoService, IssueResponse } from './todo.service'; +import { TodoService } from './todo.service'; +import { IssueResponse, githubBaseUrl } from './http-entities'; describe('TodoService', () => { @@ -19,8 +20,6 @@ describe('TodoService', () => { it('should work well', () => { const service: TodoService = TestBed.get(TodoService); - const baseUrl = service.baseUrl; - const mockIssueList: IssueResponse = [{ number: 1, title: 'Issue title 1', @@ -47,7 +46,8 @@ describe('TodoService', () => { const httpController: HttpTestingController = TestBed.get(HttpTestingController); - httpController.expectOne(request => request.url === baseUrl + '/issues' && request.params.get('state') === 'all').flush(mockIssueList); + httpController.expectOne(request => request.url === githubBaseUrl + '/issues' && + request.params.get('state') === 'all').flush(mockIssueList); httpController.verify(); }); |