Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'spec/contracts/consumer/specs/project/pipeline/index.spec.js')
-rw-r--r--spec/contracts/consumer/specs/project/pipeline/index.spec.js16
1 files changed, 6 insertions, 10 deletions
diff --git a/spec/contracts/consumer/specs/project/pipeline/index.spec.js b/spec/contracts/consumer/specs/project/pipeline/index.spec.js
index 1c0358a3e28..1453435d637 100644
--- a/spec/contracts/consumer/specs/project/pipeline/index.spec.js
+++ b/spec/contracts/consumer/specs/project/pipeline/index.spec.js
@@ -1,9 +1,7 @@
-/* eslint-disable @gitlab/require-i18n-strings */
-
import { pactWith } from 'jest-pact';
import { ProjectPipelines } from '../../../fixtures/project/pipeline/get_list_project_pipelines.fixture';
-import { getProjectPipelines } from '../../../endpoints/project/pipelines';
+import { getProjectPipelines } from '../../../resources/api/project/pipelines';
const CONSUMER_NAME = 'Pipelines#index';
const CONSUMER_LOG = '../logs/consumer.log';
@@ -23,22 +21,20 @@ pactWith(
describe(PROVIDER_NAME, () => {
beforeEach(() => {
const interaction = {
- state: 'a few pipelines for a project exists',
+ ...ProjectPipelines.scenario,
...ProjectPipelines.request,
willRespondWith: ProjectPipelines.success,
};
provider.addInteraction(interaction);
});
- it('returns a successful body', () => {
- return getProjectPipelines({
+ it('returns a successful body', async () => {
+ const pipelines = await getProjectPipelines({
url: provider.mockService.baseUrl,
- }).then((pipelines) => {
- expect(pipelines).toEqual(ProjectPipelines.body);
});
+
+ expect(pipelines).toEqual(ProjectPipelines.body);
});
});
},
);
-
-/* eslint-enable @gitlab/require-i18n-strings */