aboutsummaryrefslogtreecommitdiff
path: root/Timeline/ClientApp/src/app/user/internal-user-service/internal-user.service.spec.ts
diff options
context:
space:
mode:
author杨宇千 <crupest@outlook.com>2019-03-11 21:30:22 +0800
committerGitHub <noreply@github.com>2019-03-11 21:30:22 +0800
commit4535d1fd30eb02b3fe60718235a0725e3b30049e (patch)
treed9d2ea66bb3b5586b3e0f9ac390dc3ac96096e2e /Timeline/ClientApp/src/app/user/internal-user-service/internal-user.service.spec.ts
parent8caef17dd3e455de27f44d13751c27ee4dfe2e1e (diff)
parent87f7b00f9414b7633a080838a725a687461efd68 (diff)
downloadtimeline-4535d1fd30eb02b3fe60718235a0725e3b30049e.tar.gz
timeline-4535d1fd30eb02b3fe60718235a0725e3b30049e.tar.bz2
timeline-4535d1fd30eb02b3fe60718235a0725e3b30049e.zip
Merge pull request #12 from crupest/strict
Use strict check of typescript compiler.
Diffstat (limited to 'Timeline/ClientApp/src/app/user/internal-user-service/internal-user.service.spec.ts')
-rw-r--r--Timeline/ClientApp/src/app/user/internal-user-service/internal-user.service.spec.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/Timeline/ClientApp/src/app/user/internal-user-service/internal-user.service.spec.ts b/Timeline/ClientApp/src/app/user/internal-user-service/internal-user.service.spec.ts
index 4db28768..613a8fa6 100644
--- a/Timeline/ClientApp/src/app/user/internal-user-service/internal-user.service.spec.ts
+++ b/Timeline/ClientApp/src/app/user/internal-user-service/internal-user.service.spec.ts
@@ -49,7 +49,7 @@ describe('InternalUserService', () => {
const httpController = TestBed.get(HttpTestingController) as HttpTestingController;
httpController.expectOne((request: HttpRequest<CreateTokenRequest>) =>
- request.url === createTokenUrl &&
+ request.url === createTokenUrl && request.body !== null &&
request.body.username === 'user' &&
request.body.password === 'user').flush(<CreateTokenResponse>{
token: 'test-token',
@@ -73,7 +73,7 @@ describe('InternalUserService', () => {
const mockToken = 'mock-token';
const tokenValidateRequestMatcher = (req: HttpRequest<ValidateTokenRequest>) => {
- return req.url === validateTokenUrl && req.body.token === mockToken;
+ return req.url === validateTokenUrl && req.body !== null && req.body.token === mockToken;
};
beforeEach(() => {