mirror of
https://github.com/badges/shields.git
synced 2026-11-21 16:06:35 +03:00
* fix [bugzilla] live test case to use new custom base url ecplise seems to be in archive mode and may not work anymore in the future. this commit fixes live tests failed in our daily tests. * Update example for baseUrl and bugNumber eclipse bugzilla is in archive mode, we switched live tests to gnu's gcc. update the baseUrl example as well as the example bug number to fit both default baseUrl and the new example
32 lines
714 B
JavaScript
32 lines
714 B
JavaScript
import Joi from 'joi'
|
|
import { createServiceTester } from '../tester.js'
|
|
export const t = await createServiceTester()
|
|
|
|
const bzBugStatus = Joi.equal(
|
|
'unconfirmed',
|
|
'new',
|
|
'assigned',
|
|
'fixed',
|
|
'invalid',
|
|
"won't fix",
|
|
'duplicate',
|
|
'works for me',
|
|
'incomplete',
|
|
)
|
|
|
|
t.create('Bugzilla valid bug status').get('/996038.json').expectBadge({
|
|
label: 'bug 996038',
|
|
message: bzBugStatus,
|
|
})
|
|
|
|
t.create('Bugzilla valid bug status with custom baseUrl')
|
|
.get('/12345.json?baseUrl=https://gcc.gnu.org/bugzilla')
|
|
.expectBadge({
|
|
label: 'bug 12345',
|
|
message: bzBugStatus,
|
|
})
|
|
|
|
t.create('Bugzilla invalid bug status')
|
|
.get('/001.json')
|
|
.expectBadge({ label: 'bugzilla', message: 'not found' })
|