tidy up [GitHubGist] routes (#8510)

Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
This commit is contained in:
chris48s
2022-11-04 19:43:14 +00:00
committed by GitHub
parent e223f45bce
commit c8a0a8660e
8 changed files with 61 additions and 13 deletions

View File

@@ -0,0 +1,24 @@
import { createServiceTester } from '../../tester.js'
export const t = await createServiceTester()
t.create('last commit in gist (ancient)').get('/871064.json').expectBadge({
label: 'last commit',
message: 'september 2015',
color: 'red',
})
// not checking the color badge, since in August 2022 it is orange but later it will become red
t.create('last commit in gist (still ancient but slightly less so)')
.get('/870071abadfd66a28bf539677332f12b.json')
.expectBadge({
label: 'last commit',
message: 'october 2020',
})
t.create('last commit in gist (gist not found)')
.get('/55555555555555.json')
.expectBadge({
label: 'last commit',
message: 'gist not found',
color: 'red',
})