mirror of
https://github.com/shivammathur/setup-php.git
synced 2024-11-26 13:23:05 +07:00
24 lines
623 B
JavaScript
24 lines
623 B
JavaScript
var codeship = require('../../lib/services/codeship')
|
|
|
|
describe('Codeship CI Provider', function() {
|
|
it('can detect codeship', function() {
|
|
process.env.CI_NAME = 'codeship'
|
|
expect(codeship.detect()).toBe(true)
|
|
})
|
|
|
|
it('can get codeship env info', function() {
|
|
process.env.CI_BUILD_NUMBER = '1234'
|
|
process.env.CI_COMMIT_ID = '5678'
|
|
process.env.CI_BRANCH = 'master'
|
|
process.env.CI_BUILD_URL = 'https://...'
|
|
|
|
expect(codeship.configuration()).toEqual({
|
|
service: 'codeship',
|
|
commit: '5678',
|
|
build: '1234',
|
|
branch: 'master',
|
|
build_url: 'https://...',
|
|
})
|
|
})
|
|
})
|