summaryrefslogtreecommitdiff
path: root/spec/frontend/pipeline_editor/graphql/resolvers_spec.js
diff options
context:
space:
mode:
Diffstat (limited to 'spec/frontend/pipeline_editor/graphql/resolvers_spec.js')
-rw-r--r--spec/frontend/pipeline_editor/graphql/resolvers_spec.js18
1 files changed, 18 insertions, 0 deletions
diff --git a/spec/frontend/pipeline_editor/graphql/resolvers_spec.js b/spec/frontend/pipeline_editor/graphql/resolvers_spec.js
index d39c0d80296..196a4133eea 100644
--- a/spec/frontend/pipeline_editor/graphql/resolvers_spec.js
+++ b/spec/frontend/pipeline_editor/graphql/resolvers_spec.js
@@ -46,6 +46,24 @@ describe('~/pipeline_editor/graphql/resolvers', () => {
await expect(result.rawData).resolves.toBe(mockCiYml);
});
});
+
+ describe('pipeline', () => {
+ it('resolves pipeline data with type names', async () => {
+ const result = await resolvers.Query.project(null);
+
+ // eslint-disable-next-line no-underscore-dangle
+ expect(result.__typename).toBe('Project');
+ });
+
+ it('resolves pipeline data with necessary data', async () => {
+ const result = await resolvers.Query.project(null);
+ const pipelineKeys = Object.keys(result.pipeline);
+ const statusKeys = Object.keys(result.pipeline.detailedStatus);
+
+ expect(pipelineKeys).toContain('id', 'commitPath', 'detailedStatus', 'shortSha');
+ expect(statusKeys).toContain('detailsPath', 'text');
+ });
+ });
});
describe('Mutation', () => {