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/frontend/snippets/components/snippet_blob_edit_spec.js')
-rw-r--r--spec/frontend/snippets/components/snippet_blob_edit_spec.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/frontend/snippets/components/snippet_blob_edit_spec.js b/spec/frontend/snippets/components/snippet_blob_edit_spec.js
index b699e056576..53993921621 100644
--- a/spec/frontend/snippets/components/snippet_blob_edit_spec.js
+++ b/spec/frontend/snippets/components/snippet_blob_edit_spec.js
@@ -102,10 +102,20 @@ describe('Snippet Blob Edit component', () => {
describe('with unloaded blob and JSON content', () => {
beforeEach(() => {
+ jest.spyOn(axios, 'get');
axiosMock.onGet(TEST_FULL_PATH).reply(HTTP_STATUS_OK, TEST_JSON_CONTENT);
createComponent();
});
+ it('makes an API request for the blob content', () => {
+ const expectedConfig = {
+ transformResponse: [expect.any(Function)],
+ headers: { 'Cache-Control': 'no-cache' },
+ };
+
+ expect(axios.get).toHaveBeenCalledWith(TEST_FULL_PATH, expectedConfig);
+ });
+
// This checks against this issue https://gitlab.com/gitlab-org/gitlab/-/issues/241199
it('emits raw content', async () => {
await waitForPromises();