aboutsummaryrefslogtreecommitdiff
path: root/Timeline/ClientApp/src/app/todo/todo-service/todo.service.spec.ts
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2019-03-11 00:14:48 +0800
committercrupest <crupest@outlook.com>2019-03-11 00:14:48 +0800
commit92cd9a980075fa482bd7f67412c618e54ac9501c (patch)
tree3cc369a51013e4f2e220aaf3ec32ed74104ad808 /Timeline/ClientApp/src/app/todo/todo-service/todo.service.spec.ts
parentf8cfca136a69c6589bb610a66ea5342fc585f19b (diff)
downloadtimeline-92cd9a980075fa482bd7f67412c618e54ac9501c.tar.gz
timeline-92cd9a980075fa482bd7f67412c618e54ac9501c.tar.bz2
timeline-92cd9a980075fa482bd7f67412c618e54ac9501c.zip
Extract out http entities.
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();
});