Fix trailing 0 in [F-Droid] yaml format (#3831)

Closes #3830
This commit is contained in:
Paul Melnikow
2019-08-06 15:39:55 +02:00
committed by GitHub
parent acfcf82d1f
commit 4eb6d25ff7
2 changed files with 15 additions and 1 deletions

View File

@@ -7,7 +7,7 @@ const { BaseYamlService, InvalidResponse } = require('..')
const schema = Joi.object({
CurrentVersion: Joi.alternatives()
.try(Joi.number(), Joi.string())
.try(Joi.string(), Joi.number())
.required(),
}).required()

View File

@@ -129,6 +129,20 @@ t.create('Package is found with fallback yml matadata format')
)
.expectBadge({ label: 'f-droid', message: 'v1.4' })
t.create('Trailing 0 in yml format')
.get('/v/axp.tool.apkextractor.json')
.intercept(nock =>
nock(base)
.get(`${path}.txt`)
.reply(404)
)
.intercept(nock =>
nock(base)
.get(`${path}.yml`)
.reply(200, "CurrentVersion: '1.4000'")
)
.expectBadge({ label: 'f-droid', message: 'v1.4000' })
t.create('Package is found with yml matadata format')
.get('/v/axp.tool.apkextractor.json?metadata_format=yml')
.intercept(nock =>