fix(api): send json messages for challenge routes (#37494)

This commit is contained in:
mrugesh
2019-10-24 17:30:23 +05:30
committed by GitHub
parent 94635dcc0b
commit f090730015
3 changed files with 19 additions and 14 deletions

View File

@ -247,8 +247,8 @@ describe('boot/challenge', () => {
isValidChallengeCompletion(req, res, next);
expect(res.sendStatus.called).toBe(true);
expect(res.sendStatus.getCall(0).args[0]).toBe(403);
expect(res.status.called).toBe(true);
expect(res.status.getCall(0).args[0]).toBe(403);
expect(next.called).toBe(false);
});
@ -262,8 +262,8 @@ describe('boot/challenge', () => {
isValidChallengeCompletion(req, res, next);
expect(res.sendStatus.called).toBe(true);
expect(res.sendStatus.getCall(0).args[0]).toBe(403);
expect(res.status.called).toBe(true);
expect(res.status.getCall(0).args[0]).toBe(403);
expect(next.called).toBe(false);
});
@ -281,8 +281,8 @@ describe('boot/challenge', () => {
isValidChallengeCompletion(req, res, next);
expect(res.sendStatus.called).toBe(true);
expect(res.sendStatus.getCall(0).args[0]).toBe(403);
expect(res.status.called).toBe(true);
expect(res.status.getCall(0).args[0]).toBe(403);
expect(next.called).toBe(false);
});