Files
shields/services/codeship/codeship.tester.js
2019-03-04 19:41:57 -05:00

27 lines
778 B
JavaScript

'use strict'
const { isBuildStatus } = require('../build-status')
const t = (module.exports = require('../tester').createServiceTester())
t.create('codeship (valid, no branch)')
.get('/d6c1ddd0-16a3-0132-5f85-2e35c05e22b1.json')
.expectBadge({
label: 'build',
message: isBuildStatus,
})
t.create('codeship (valid, with branch)')
.get('/0bdb0440-3af5-0133-00ea-0ebda3a33bf6/master.json')
.expectBadge({
label: 'build',
message: isBuildStatus,
})
t.create('codeship (repo not found)')
.get('/not-a-repo.json')
.expectBadge({ label: 'build', message: 'project not found' })
t.create('codeship (branch not found)')
.get('/d6c1ddd0-16a3-0132-5f85-2e35c05e22b1/not-a-branch.json')
.expectBadge({ label: 'build', message: 'branch not found' })