1
0
mirror of synced 2025-12-22 11:26:57 -05:00
Files
docs/tests/routing/enterprise-release-notes.js
Jason Etcovitch d891618fcc Import Enterprise release notes for 2.20, 2.21 and 2.22.5 (#16909)
* Add 2.20

* Add 2.21

* Add 2.22.5

* Lint

* Properly format dates

* Update the tests
2020-12-14 15:16:29 +00:00

25 lines
993 B
JavaScript

const { get } = require('../helpers/supertest')
describe('enterprise release notes', () => {
jest.setTimeout(60 * 1000)
beforeAll(async () => {
// The first page load takes a long time so let's get it out of the way in
// advance to call out that problem specifically rather than misleadingly
// attributing it to the first test
await get('/')
})
it('redirects to the release notes on enterprise.github.com if none are present for this version here', async () => {
const res = await get('/en/enterprise-server@2.19/admin/release-notes')
expect(res.statusCode).toBe(302)
expect(res.headers.location).toBe('https://enterprise.github.com/releases/2.19.0/notes')
})
// We can't write this test until we have real release notes
it('renders the release-notes layout if this version\'s release notes are in this repo', async () => {
const res = await get('/en/enterprise-server@2.22/admin/release-notes')
expect(res.statusCode).toBe(200)
})
})