mirror of
https://github.com/badges/shields.git
synced 2025-12-01 18:37:54 +03:00
40 lines
944 B
JavaScript
40 lines
944 B
JavaScript
'use strict'
|
|
|
|
const { isBuildStatus } = require('../build-status')
|
|
const t = (module.exports = require('../tester').createServiceTester())
|
|
|
|
t.create('Pipeline status')
|
|
.get('/gitlab-org/gitlab.json')
|
|
.expectBadge({
|
|
label: 'build',
|
|
message: isBuildStatus,
|
|
})
|
|
|
|
t.create('Pipeline status (branch)')
|
|
.get('/gitlab-org/gitlab/v10.7.6.json')
|
|
.expectBadge({
|
|
label: 'build',
|
|
message: isBuildStatus,
|
|
})
|
|
|
|
t.create('Pipeline status (nonexistent branch)')
|
|
.get('/gitlab-org/gitlab/nope-not-a-branch.json')
|
|
.expectBadge({
|
|
label: 'build',
|
|
message: 'branch not found',
|
|
})
|
|
|
|
t.create('Pipeline status (nonexistent repo)')
|
|
.get('/this-repo/does-not-exist.json')
|
|
.expectBadge({
|
|
label: 'build',
|
|
message: 'repo not found',
|
|
})
|
|
|
|
t.create('Pipeline status (custom gitlab URL)')
|
|
.get('/GNOME/pango.json?gitlab_url=https://gitlab.gnome.org')
|
|
.expectBadge({
|
|
label: 'build',
|
|
message: isBuildStatus,
|
|
})
|