refactor(app-config): rename allow_custom_connection as custom_connection_allowed
This commit is contained in:
@@ -10,11 +10,11 @@ export default async (request, response) => {
|
||||
};
|
||||
|
||||
const appConfigParams = (request) => {
|
||||
const { allowCustomConnection, shared, disabled } = request.body;
|
||||
const { customConnectionAllowed, shared, disabled } = request.body;
|
||||
|
||||
return {
|
||||
key: request.params.appKey,
|
||||
allowCustomConnection,
|
||||
customConnectionAllowed,
|
||||
shared,
|
||||
disabled,
|
||||
};
|
||||
|
@@ -23,7 +23,7 @@ describe('POST /api/v1/admin/apps/:appKey/config', () => {
|
||||
|
||||
it('should return created app config', async () => {
|
||||
const appConfig = {
|
||||
allowCustomConnection: true,
|
||||
customConnectionAllowed: true,
|
||||
shared: true,
|
||||
disabled: false,
|
||||
};
|
||||
@@ -44,7 +44,7 @@ describe('POST /api/v1/admin/apps/:appKey/config', () => {
|
||||
it('should return HTTP 422 for already existing app config', async () => {
|
||||
const appConfig = {
|
||||
key: 'gitlab',
|
||||
allowCustomConnection: true,
|
||||
customConnectionAllowed: true,
|
||||
shared: true,
|
||||
disabled: false,
|
||||
};
|
||||
|
@@ -14,10 +14,10 @@ export default async (request, response) => {
|
||||
};
|
||||
|
||||
const appConfigParams = (request) => {
|
||||
const { allowCustomConnection, shared, disabled } = request.body;
|
||||
const { customConnectionAllowed, shared, disabled } = request.body;
|
||||
|
||||
return {
|
||||
allowCustomConnection,
|
||||
customConnectionAllowed,
|
||||
shared,
|
||||
disabled,
|
||||
};
|
||||
|
@@ -24,7 +24,7 @@ describe('PATCH /api/v1/admin/apps/:appKey/config', () => {
|
||||
it('should return updated app config', async () => {
|
||||
const appConfig = {
|
||||
key: 'gitlab',
|
||||
allowCustomConnection: true,
|
||||
customConnectionAllowed: true,
|
||||
shared: true,
|
||||
disabled: false,
|
||||
};
|
||||
@@ -34,7 +34,7 @@ describe('PATCH /api/v1/admin/apps/:appKey/config', () => {
|
||||
const newAppConfigValues = {
|
||||
shared: false,
|
||||
disabled: true,
|
||||
allowCustomConnection: false,
|
||||
customConnectionAllowed: false,
|
||||
};
|
||||
|
||||
const response = await request(app)
|
||||
@@ -55,7 +55,7 @@ describe('PATCH /api/v1/admin/apps/:appKey/config', () => {
|
||||
const appConfig = {
|
||||
shared: false,
|
||||
disabled: true,
|
||||
allowCustomConnection: false,
|
||||
customConnectionAllowed: false,
|
||||
};
|
||||
|
||||
await request(app)
|
||||
@@ -68,7 +68,7 @@ describe('PATCH /api/v1/admin/apps/:appKey/config', () => {
|
||||
it('should return HTTP 422 for invalid app config data', async () => {
|
||||
const appConfig = {
|
||||
key: 'gitlab',
|
||||
allowCustomConnection: true,
|
||||
customConnectionAllowed: true,
|
||||
shared: true,
|
||||
disabled: false,
|
||||
};
|
||||
|
Reference in New Issue
Block a user