mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 01:54:15 +00:00
add test to prove the response body isn't part of the output
This commit is contained in:
@@ -11,6 +11,17 @@ describe('StatusCodeOnlyResponseParsingService', () => {
|
||||
|
||||
describe('parse', () => {
|
||||
|
||||
it('should return a RestResponse that doesn\'t contain the response body', () => {
|
||||
const payload = 'd9128e44-183b-479d-aa2e-d39435838bf6';
|
||||
const result = service.parse(undefined, {
|
||||
payload,
|
||||
statusCode: 201,
|
||||
statusText: '201'
|
||||
});
|
||||
|
||||
expect(JSON.stringify(result).indexOf(payload)).toBe(-1);
|
||||
});
|
||||
|
||||
describe('when the response is successful', () => {
|
||||
beforeEach(() => {
|
||||
statusCode = 201;
|
||||
|
Reference in New Issue
Block a user