Files
shields/services/travis/travis-php-version-redirect.tester.js
Paul Melnikow 051e7d04c1 Rewrite [travisphpversion]; improve error message in expectBadge (#3352)
The change in `expectBadge` prints a more helpful error when `message` is empty.

Ref #2863
2019-04-23 23:03:21 -04:00

24 lines
592 B
JavaScript

'use strict'
const { ServiceTester } = require('../tester')
const t = (module.exports = new ServiceTester({
id: 'TravisPhpVersionRedirect',
title: 'TravisPhpVersionRedirect',
pathPrefix: '/travis-ci/php-v',
}))
t.create('travis-ci no branch')
.get('/symfony/symfony.svg', {
followRedirect: false,
})
.expectStatus(301)
.expectHeader('Location', '/travis/php-v/symfony/symfony.svg')
t.create('travis-ci branch')
.get('/symfony/symfony/2.8.svg', {
followRedirect: false,
})
.expectStatus(301)
.expectHeader('Location', '/travis/php-v/symfony/symfony/2.8.svg')