diff options
Diffstat (limited to 'spec/frontend/pipeline_editor/graphql/resolvers_spec.js')
-rw-r--r-- | spec/frontend/pipeline_editor/graphql/resolvers_spec.js | 39 |
1 files changed, 1 insertions, 38 deletions
diff --git a/spec/frontend/pipeline_editor/graphql/resolvers_spec.js b/spec/frontend/pipeline_editor/graphql/resolvers_spec.js index d39c0d80296..76ae96c623a 100644 --- a/spec/frontend/pipeline_editor/graphql/resolvers_spec.js +++ b/spec/frontend/pipeline_editor/graphql/resolvers_spec.js @@ -1,15 +1,8 @@ import MockAdapter from 'axios-mock-adapter'; -import Api from '~/api'; import axios from '~/lib/utils/axios_utils'; import httpStatus from '~/lib/utils/http_status'; import { resolvers } from '~/pipeline_editor/graphql/resolvers'; -import { - mockCiConfigPath, - mockCiYml, - mockDefaultBranch, - mockLintResponse, - mockProjectFullPath, -} from '../mock_data'; +import { mockLintResponse } from '../mock_data'; jest.mock('~/api', () => { return { @@ -18,36 +11,6 @@ jest.mock('~/api', () => { }); describe('~/pipeline_editor/graphql/resolvers', () => { - describe('Query', () => { - describe('blobContent', () => { - beforeEach(() => { - Api.getRawFile.mockResolvedValue({ - data: mockCiYml, - }); - }); - - afterEach(() => { - Api.getRawFile.mockReset(); - }); - - it('resolves lint data with type names', async () => { - const result = resolvers.Query.blobContent(null, { - projectPath: mockProjectFullPath, - path: mockCiConfigPath, - ref: mockDefaultBranch, - }); - - expect(Api.getRawFile).toHaveBeenCalledWith(mockProjectFullPath, mockCiConfigPath, { - ref: mockDefaultBranch, - }); - - // eslint-disable-next-line no-underscore-dangle - expect(result.__typename).toBe('BlobContent'); - await expect(result.rawData).resolves.toBe(mockCiYml); - }); - }); - }); - describe('Mutation', () => { describe('lintCI', () => { let mock; |