mirror of
https://github.com/badges/shields.git
synced 2025-11-03 15:13:18 +03:00
[sourceforge] add repo param to last commit service (#10935)
* [sourceforge] add repo param to last commit service some sourceforge projects have multiple repositories, so we need to specify the repository to use for the last commit service. * [sourceforge] add redirect for old project param only URLs
This commit is contained in:
@@ -3,9 +3,17 @@ import { createServiceTester } from '../tester.js'
|
||||
export const t = await createServiceTester()
|
||||
|
||||
t.create('last commit')
|
||||
.get('/guitarix.json')
|
||||
.get('/guitarix/git.json')
|
||||
.expectBadge({ label: 'last commit', message: isFormattedDate })
|
||||
|
||||
t.create('last commit (non default repo)')
|
||||
.get('/opencamera/code.json')
|
||||
.expectBadge({ label: 'last commit', message: isFormattedDate })
|
||||
|
||||
t.create('last commit (project not found)')
|
||||
.get('/that-doesnt-exist.json')
|
||||
.expectBadge({ label: 'last commit', message: 'project not found' })
|
||||
.get('/that-doesnt-exist/fake.json')
|
||||
.expectBadge({ label: 'last commit', message: 'project or repo not found' })
|
||||
|
||||
t.create('last commit (repo not found)')
|
||||
.get('/guitarix/fake-repo.json')
|
||||
.expectBadge({ label: 'last commit', message: 'project or repo not found' })
|
||||
|
||||
Reference in New Issue
Block a user