diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-05-17 16:05:49 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-05-17 16:05:49 +0000 |
commit | 43a25d93ebdabea52f99b05e15b06250cd8f07d7 (patch) | |
tree | dceebdc68925362117480a5d672bcff122fb625b /spec/frontend/projects/commit_box/info/load_branches_spec.js | |
parent | 20c84b99005abd1c82101dfeff264ac50d2df211 (diff) | |
download | gitlab-ce-0f94cf6ca9d272d8e0fda4a7a597866cf3dc1fc0.tar.gz |
Add latest changes from gitlab-org/gitlab@16-0-stable-eev16.0.0-rc4216-0-stable
Diffstat (limited to 'spec/frontend/projects/commit_box/info/load_branches_spec.js')
-rw-r--r-- | spec/frontend/projects/commit_box/info/load_branches_spec.js | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/frontend/projects/commit_box/info/load_branches_spec.js b/spec/frontend/projects/commit_box/info/load_branches_spec.js index e49d92188ed..b00a6378e07 100644 --- a/spec/frontend/projects/commit_box/info/load_branches_spec.js +++ b/spec/frontend/projects/commit_box/info/load_branches_spec.js @@ -4,6 +4,9 @@ import { setHTMLFixture } from 'helpers/fixtures'; import waitForPromises from 'helpers/wait_for_promises'; import { HTTP_STATUS_INTERNAL_SERVER_ERROR, HTTP_STATUS_OK } from '~/lib/utils/http_status'; import { loadBranches } from '~/projects/commit_box/info/load_branches'; +import { initDetailsButton } from '~/projects/commit_box/info/init_details_button'; + +jest.mock('~/projects/commit_box/info/init_details_button'); const mockCommitPath = '/commit/abcd/branches'; const mockBranchesRes = @@ -26,6 +29,13 @@ describe('~/projects/commit_box/info/load_branches', () => { mock.onGet(mockCommitPath).reply(HTTP_STATUS_OK, mockBranchesRes); }); + it('initializes the details button', async () => { + loadBranches(); + await waitForPromises(); + + expect(initDetailsButton).toHaveBeenCalled(); + }); + it('loads and renders branches info', async () => { loadBranches(); await waitForPromises(); |