Commits
Giuseppe Digilio authored 2642ed35b78
300 300 | service.createEPersonForToken(EPersonMock, 'test-token'); |
301 301 | |
302 302 | const expected = new PostRequest(requestService.generateRequestId(), epersonsEndpoint + '?token=test-token', EPersonMock); |
303 303 | expect(requestService.send).toHaveBeenCalledWith(expected); |
304 304 | }); |
305 305 | }); |
306 306 | describe('patchPasswordWithToken', () => { |
307 307 | it('should sent a patch request with an uuid, token and new password to the epersons endpoint', () => { |
308 308 | service.patchPasswordWithToken('test-uuid', 'test-token', 'test-password'); |
309 309 | |
310 - | const operation = Object.assign({ op: 'add', path: '/password', value: { password: 'test-password' } }); |
310 + | const operation = Object.assign({ op: 'add', path: '/password', value: { new_password: 'test-password' } }); |
311 311 | const expected = new PatchRequest(requestService.generateRequestId(), epersonsEndpoint + '/test-uuid?token=test-token', [operation]); |
312 312 | |
313 313 | expect(requestService.send).toHaveBeenCalledWith(expected); |
314 314 | }); |
315 315 | }); |
316 316 | |
317 317 | }); |
318 318 | |
319 319 | class DummyChangeAnalyzer implements ChangeAnalyzer<Item> { |
320 320 | diff(object1: Item, object2: Item): Operation[] { |