aboutsummaryrefslogtreecommitdiff
path: root/Timeline/ClientApp/src/app/todo/todo-service/todo.service.spec.ts
diff options
context:
space:
mode:
author杨宇千 <crupest@outlook.com>2019-03-11 19:52:29 +0800
committerGitHub <noreply@github.com>2019-03-11 19:52:29 +0800
commit8caef17dd3e455de27f44d13751c27ee4dfe2e1e (patch)
tree5b485ad438c9be9c180d425453588ff1c575a42d /Timeline/ClientApp/src/app/todo/todo-service/todo.service.spec.ts
parent17d90077b289c6b2203a34de727dd77c1985f146 (diff)
parentb26342764046d188d223aa494c3bbbf76deb4927 (diff)
downloadtimeline-8caef17dd3e455de27f44d13751c27ee4dfe2e1e.tar.gz
timeline-8caef17dd3e455de27f44d13751c27ee4dfe2e1e.tar.bz2
timeline-8caef17dd3e455de27f44d13751c27ee4dfe2e1e.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.ts8
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();
});