Files
shields/services/keybase/keybase-pgp.tester.js
chris48s 8621fe42d7 Upgrade Joi (#3505)
* upgrade joi
* find & replace ALL THE THINGS
* update related deps
2019-06-02 21:59:55 +01:00

35 lines
675 B
JavaScript

'use strict'
const Joi = require('@hapi/joi')
const t = (module.exports = require('../tester').createServiceTester())
t.create('existing key fingerprint')
.get('/skyplabs.json')
.expectBadge({
label: 'pgp',
message: Joi.string()
.hex()
.length(16),
})
t.create('unknown username')
.get('/skyplabsssssss.json')
.expectBadge({
label: 'pgp',
message: 'profile not found',
})
t.create('invalid username')
.get('/s.json')
.expectBadge({
label: 'pgp',
message: 'invalid username',
})
t.create('missing key fingerprint')
.get('/skyp.json')
.expectBadge({
label: 'pgp',
message: 'no key fingerprint found',
})