diff options
author | Shinya Maeda <shinya@gitlab.com> | 2019-01-08 17:31:14 +0300 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2019-01-08 17:31:14 +0300 |
commit | 89343b26c3e2533f0f415758a310cd215c58a282 (patch) | |
tree | fbb60e831538094ef83bcccf7ed77fb959cc2d69 /spec/javascripts/releases | |
parent | fa5c4ef2641fe7b55dd63bbe0d99e58fec9944e3 (diff) |
Add feature spec for Release page MVC
Diffstat (limited to 'spec/javascripts/releases')
-rw-r--r-- | spec/javascripts/releases/components/release_block_spec.js | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/javascripts/releases/components/release_block_spec.js b/spec/javascripts/releases/components/release_block_spec.js index 1268cdad08d..36b181f24ef 100644 --- a/spec/javascripts/releases/components/release_block_spec.js +++ b/spec/javascripts/releases/components/release_block_spec.js @@ -137,4 +137,16 @@ describe('Release block', () => { it('renders author avatar', () => { expect(vm.$el.querySelector('.user-avatar-link')).not.toBeNull(); }); + + describe('external label', () => { + it('renders external label when link is external', () => { + expect(vm.$el.querySelector('.js-assets-list li a').textContent).toContain('external source'); + }); + + it('does not render external label when link is not external', () => { + expect(vm.$el.querySelector('.js-assets-list li:nth-child(2) a').textContent).not.toContain( + 'external source', + ); + }); + }); }); |