mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-07-13 04:41:36 +00:00
Merge 98e1e5a29a into 82aec5f60c
This commit is contained in:
commit
2bd29ee6c0
2 changed files with 23 additions and 2 deletions
|
|
@ -45,4 +45,22 @@ describe('Audible', () => {
|
|||
expect(result).to.equal('.5')
|
||||
})
|
||||
})
|
||||
|
||||
describe('cleanResult', () => {
|
||||
it('should decode HTML entities in the title and subtitle (#5340)', () => {
|
||||
const result = audible.cleanResult({
|
||||
title: 'The "Hitler" Myth',
|
||||
subtitle: 'Image & Reality in the Third Reich',
|
||||
asin: 'B0TESTASIN'
|
||||
})
|
||||
expect(result.title).to.equal('The "Hitler" Myth')
|
||||
expect(result.subtitle).to.equal('Image & Reality in the Third Reich')
|
||||
})
|
||||
|
||||
it('should keep a null subtitle when none is provided', () => {
|
||||
const result = audible.cleanResult({ title: 'A Plain Title', asin: 'B0TESTASIN' })
|
||||
expect(result.title).to.equal('A Plain Title')
|
||||
expect(result.subtitle).to.equal(null)
|
||||
})
|
||||
})
|
||||
})
|
||||
Loading…
Add table
Add a link
Reference in a new issue