From ff24bf3ff8931cdb55e7e4a0e38709cfb9736635 Mon Sep 17 00:00:00 2001 From: Marcin Mielnicki Date: Tue, 27 Feb 2018 04:11:50 +0100 Subject: [PATCH] [travis] Updated an expected value in a service test of Travis PHP version badge (#1526) * Updated an expected value in a service test of Travis PHP version badge * Use the isPhpVersionReduction in a service tests of Travis PHP version --- service-tests/travis.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/service-tests/travis.js b/service-tests/travis.js index fb200897d6..7152ae845b 100644 --- a/service-tests/travis.js +++ b/service-tests/travis.js @@ -1,21 +1,23 @@ 'use strict'; +const Joi = require('joi'); const ServiceTester = require('./runner/service-tester'); +const {isPhpVersionReduction} = require('./helpers/validators'); const t = new ServiceTester({ id: 'travis', title: 'PHP version from .travis.yml' }); module.exports = t; t.create('gets the package version of symfony') .get('/php-v/symfony/symfony.json') - .expectJSON({ name: 'PHP', value: '>= 7.1' }); + .expectJSONTypes(Joi.object().keys({ name: 'PHP', value: isPhpVersionReduction })); t.create('gets the package version of symfony 2.8') .get('/php-v/symfony/symfony/2.8.json') - .expectJSON({ name: 'PHP', value: '>= 5.4, HHVM' }); + .expectJSONTypes(Joi.object().keys({ name: 'PHP', value: isPhpVersionReduction })); t.create('gets the package version of yii') .get('/php-v/yiisoft/yii.json') - .expectJSON({ name: 'PHP', value: '5.3 - 7.1, HHVM' }); + .expectJSONTypes(Joi.object().keys({ name: 'PHP', value: isPhpVersionReduction })); t.create('invalid package name') .get('/php-v/frodo/is-not-a-package.json')