The change in `expectBadge` prints a more helpful error when `message` is empty. Ref #2863
24 lines
592 B
JavaScript
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')
|