diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-05-20 17:34:42 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-05-20 17:34:42 +0300 |
commit | 9f46488805e86b1bc341ea1620b866016c2ce5ed (patch) | |
tree | f9748c7e287041e37d6da49e0a29c9511dc34768 /spec/frontend/releases/components/release_block_spec.js | |
parent | dfc92d081ea0332d69c8aca2f0e745cb48ae5e6d (diff) |
Add latest changes from gitlab-org/gitlab@13-0-stable-ee
Diffstat (limited to 'spec/frontend/releases/components/release_block_spec.js')
-rw-r--r-- | spec/frontend/releases/components/release_block_spec.js | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/spec/frontend/releases/components/release_block_spec.js b/spec/frontend/releases/components/release_block_spec.js index 9846fcb65eb..19119d99f3c 100644 --- a/spec/frontend/releases/components/release_block_spec.js +++ b/spec/frontend/releases/components/release_block_spec.js @@ -1,6 +1,5 @@ import $ from 'jquery'; import { mount } from '@vue/test-utils'; -import { first } from 'underscore'; import EvidenceBlock from '~/releases/components/evidence_block.vue'; import ReleaseBlock from '~/releases/components/release_block.vue'; import ReleaseBlockFooter from '~/releases/components/release_block_footer.vue'; @@ -80,11 +79,11 @@ describe('Release block', () => { ); expect(wrapper.find('.js-sources-dropdown li a').attributes().href).toEqual( - first(release.assets.sources).url, + release.assets.sources[0].url, ); expect(wrapper.find('.js-sources-dropdown li a').text()).toContain( - first(release.assets.sources).format, + release.assets.sources[0].format, ); }); @@ -92,12 +91,10 @@ describe('Release block', () => { expect(wrapper.findAll('.js-assets-list li').length).toEqual(release.assets.links.length); expect(wrapper.find('.js-assets-list li a').attributes().href).toEqual( - first(release.assets.links).directAssetUrl, + release.assets.links[0].directAssetUrl, ); - expect(wrapper.find('.js-assets-list li a').text()).toContain( - first(release.assets.links).name, - ); + expect(wrapper.find('.js-assets-list li a').text()).toContain(release.assets.links[0].name); }); it('renders author avatar', () => { @@ -264,7 +261,7 @@ describe('Release block', () => { }); it('renders a link to the milestone with a tooltip', () => { - const milestone = first(release.milestones); + const milestone = release.milestones[0]; const milestoneLink = wrapper.find('.js-milestone-link'); expect(milestoneLink.exists()).toBe(true); |