Skip to content

Commit

Permalink
Use isMetric for npatrons.
Browse files Browse the repository at this point in the history
  • Loading branch information
mattbk committed Dec 1, 2017
1 parent 47803f7 commit 66fc147
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion service-tests/liberapay.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ const Joi = require('joi');
const ServiceTester = require('./runner/service-tester');
const isLiberapayTestValues =
Joi.string().regex(/^([0-9]*[1-9][0-9]*(\.[0-9]+)?|[0]+\.[0-9]*[1-9][0-9]*)[ A-Za-z]{4}\/week/); //values must be greater than zero
const {isMetric} = require('./helpers/validators');
const t = new ServiceTester({ id: 'liberapay', title: 'Liberapay' });
module.exports = t;

Expand All @@ -25,7 +26,7 @@ t.create('Patrons')
.get('/patrons/Liberapay.json')
.expectJSONTypes(Joi.object().keys({
name: 'patrons',
value: Joi.string().regex(/^[1-9]+/)
value: isMetric
}));

t.create('Goal Progress')
Expand Down

0 comments on commit 66fc147

Please sign in to comment.