Moved v3 code from NginxProxyManager/nginx-proxy-manager-3 to NginxProxyManager/nginx-proxy-manager
This commit is contained in:
25
test/cypress/integration/api/SetupPhase.spec.js
Normal file
25
test/cypress/integration/api/SetupPhase.spec.js
Normal file
@ -0,0 +1,25 @@
|
||||
/// <reference types="Cypress" />
|
||||
|
||||
describe('Setup Phase', () => {
|
||||
|
||||
before(() => {
|
||||
cy.resetUsers();
|
||||
});
|
||||
|
||||
it('Should NOT be able to get a token', function() {
|
||||
cy.task('backendApiPost', {
|
||||
path: '/api/tokens',
|
||||
data: {
|
||||
type: 'password',
|
||||
identity: 'cypress@example.com',
|
||||
secret: 'changeme'
|
||||
},
|
||||
returnOnError: true
|
||||
}).then((data) => {
|
||||
cy.validateSwaggerSchema('post', 403, '/tokens', data);
|
||||
expect(data.error).to.have.property('code', 403);
|
||||
expect(data.error).to.have.property('message', 'Not available during setup phase');
|
||||
});
|
||||
});
|
||||
|
||||
});
|
Reference in New Issue
Block a user