diff options
author | winniehell <git@winniehell.de> | 2017-03-05 20:43:05 +0100 |
---|---|---|
committer | winniehell <git@winniehell.de> | 2017-03-05 21:22:40 +0100 |
commit | 572f9782d5e8d6307784b61db0dfce48f5118445 (patch) | |
tree | 11b25c46733462729e4303b26b4895d983f14df0 /spec/javascripts/environments/environment_external_url_spec.js | |
parent | 4cd2ab52548e89cd7259cfb7ce320fdfa203fe84 (diff) | |
download | gitlab-ce-572f9782d5e8d6307784b61db0dfce48f5118445.tar.gz |
Remove .es6 from file extensions (!9241)
Diffstat (limited to 'spec/javascripts/environments/environment_external_url_spec.js')
-rw-r--r-- | spec/javascripts/environments/environment_external_url_spec.js | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/spec/javascripts/environments/environment_external_url_spec.js b/spec/javascripts/environments/environment_external_url_spec.js new file mode 100644 index 00000000000..393dbb5aae0 --- /dev/null +++ b/spec/javascripts/environments/environment_external_url_spec.js @@ -0,0 +1,21 @@ +const ExternalUrlComponent = require('~/environments/components/environment_external_url'); + +describe('External URL Component', () => { + preloadFixtures('static/environments/element.html.raw'); + beforeEach(() => { + loadFixtures('static/environments/element.html.raw'); + }); + + it('should link to the provided externalUrl prop', () => { + const externalURL = 'https://gitlab.com'; + const component = new ExternalUrlComponent({ + el: document.querySelector('.test-dom-element'), + propsData: { + externalUrl: externalURL, + }, + }); + + expect(component.$el.getAttribute('href')).toEqual(externalURL); + expect(component.$el.querySelector('fa-external-link')).toBeDefined(); + }); +}); |