mirror of
https://github.com/jdalrymple/gitbeaker.git
synced 2026-01-25 16:04:01 +00:00
32 lines
903 B
TypeScript
32 lines
903 B
TypeScript
import { ProjectsBundle } from '../../../src';
|
|
|
|
const config = {
|
|
host: process.env.GITLAB_URL,
|
|
token: process.env.PERSONAL_ACCESS_TOKEN,
|
|
};
|
|
let project;
|
|
let api;
|
|
|
|
beforeAll(async () => {
|
|
api = new ProjectsBundle(config);
|
|
project = await api.Projects.create({ name: 'ProjectsBundle Integration test' });
|
|
});
|
|
|
|
describe('ProjectsBundle.Issues.create', () => {
|
|
it('should create a valid issue on a project', async () => {
|
|
const issue = await api.Issues.create(project.id, {
|
|
title: 'ProjectsBundle Integration test',
|
|
description: 'A test issue ensuring a sucessfully create Issue in GitLab',
|
|
});
|
|
|
|
expect(issue).toBeInstanceOf(Object);
|
|
expect(issue.title).toBe('ProjectsBundle Integration test');
|
|
});
|
|
|
|
it('should create a valid issue on a project', async () => {
|
|
const issue = await api.Issues.all(project.id);
|
|
|
|
expect(issue).toBeInstanceOf(Array);
|
|
});
|
|
});
|