mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-11-11 17:16:43 -05:00
Add test
This commit is contained in:
parent
4e67f13187
commit
b56185fa31
@ -1209,6 +1209,24 @@ describe('DocumentDetailComponent', () => {
|
|||||||
expect(closeSpy).toHaveBeenCalled()
|
expect(closeSpy).toHaveBeenCalled()
|
||||||
})
|
})
|
||||||
|
|
||||||
|
it('should support removing password protection from pdfs', () => {
|
||||||
|
initNormally()
|
||||||
|
component.password = 'secret'
|
||||||
|
component.removePassword()
|
||||||
|
const req = httpTestingController.expectOne(
|
||||||
|
`${environment.apiBaseUrl}documents/bulk_edit/`
|
||||||
|
)
|
||||||
|
expect(req.request.body).toEqual({
|
||||||
|
documents: [doc.id],
|
||||||
|
method: 'remove_password',
|
||||||
|
parameters: {
|
||||||
|
password: 'secret',
|
||||||
|
update_document: true,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
req.flush(true)
|
||||||
|
})
|
||||||
|
|
||||||
it('should support keyboard shortcuts', () => {
|
it('should support keyboard shortcuts', () => {
|
||||||
initNormally()
|
initNormally()
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user