nginx-proxy-manager-zh/test/cypress/e2e/api/Health.cy.js

21 lines
506 B
JavaScript
Raw Normal View History

/// <reference types="cypress" />
describe('Basic API checks', () => {
it('Should return a valid health payload', function () {
cy.task('backendApiGet', {
path: '/api/',
}).then((data) => {
// Check the swagger schema:
2020-08-05 22:47:24 -04:00
cy.validateSwaggerSchema('get', 200, '/', data);
});
});
it('Should return a valid schema payload', function () {
cy.task('backendApiGet', {
path: '/api/schema?ts=' + Date.now(),
}).then((data) => {
expect(data.openapi).to.be.equal('3.1.0');
});
});
});