mirror of
https://github.com/jdalrymple/gitbeaker.git
synced 2026-01-18 15:55:30 +00:00
it tests internals of Gitlab instead of funtionality, and fails on new versions of Gitlab, if they change the list of available settings
25 lines
738 B
TypeScript
25 lines
738 B
TypeScript
import { ApplicationSettings } from '../../../src';
|
|
|
|
describe('ApplicationSettings.all', () => {
|
|
let settings: ReturnType<ApplicationSettings['all']>;
|
|
beforeEach(async () => {
|
|
const service = new ApplicationSettings({
|
|
url: process.env.GITLAB_URL,
|
|
token: process.env.PERSONAL_ACCESS_TOKEN,
|
|
});
|
|
settings = await service.all();
|
|
});
|
|
it('should return an array', async () => {
|
|
|
|
expect(settings).toBeObject();
|
|
});
|
|
|
|
/**
|
|
* @see https://docs.gitlab.com/ee/api/settings.html#get-current-application-settings
|
|
*/
|
|
it('should contain all the required properties', async () => {
|
|
expect(Object.keys(settings)).toContain('id');
|
|
expect(Object.keys(settings)).toContain('gravatar_enabled');
|
|
});
|
|
});
|