Feature: app branding (#5357)

This commit is contained in:
shamoon
2024-01-13 11:57:25 -08:00
committed by GitHub
parent 2da5e46386
commit 2a6e79acc8
34 changed files with 675 additions and 118 deletions

View File

@@ -39,4 +39,26 @@ describe('ConfigService', () => {
)
expect(req.request.method).toEqual('PATCH')
})
it('should support upload file with form data', () => {
service.uploadFile(new File([], 'test.png'), 1, 'app_logo').subscribe()
const req = httpTestingController.expectOne(
`${environment.apiBaseUrl}config/1/`
)
expect(req.request.method).toEqual('PATCH')
expect(req.request.body).not.toBeNull()
})
it('should not pass string app_logo', () => {
service
.saveConfig({
id: 1,
app_logo: '/logo/foobar.png',
} as PaperlessConfig)
.subscribe()
const req = httpTestingController.expectOne(
`${environment.apiBaseUrl}config/1/`
)
expect(req.request.body).toEqual({ id: 1 })
})
})