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:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-01-31 18:08:42 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-01-31 18:08:42 +0300
commitc27acb1d376f7127cd33eadcc8f5683ed55262bc (patch)
tree685c31391dca71a73782b5c8626f4ef5b582dc21 /spec/frontend/blob
parent1808454313ed75c92e1384466e8c83bfbc8ae25e (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/blob')
-rw-r--r--spec/frontend/blob/components/blob_embeddable_spec.js35
1 files changed, 35 insertions, 0 deletions
diff --git a/spec/frontend/blob/components/blob_embeddable_spec.js b/spec/frontend/blob/components/blob_embeddable_spec.js
new file mode 100644
index 00000000000..b2fe71f1401
--- /dev/null
+++ b/spec/frontend/blob/components/blob_embeddable_spec.js
@@ -0,0 +1,35 @@
+import { shallowMount } from '@vue/test-utils';
+import BlobEmbeddable from '~/blob/components/blob_embeddable.vue';
+import { GlFormInputGroup } from '@gitlab/ui';
+
+describe('Blob Embeddable', () => {
+ let wrapper;
+ const url = 'https://foo.bar';
+
+ function createComponent() {
+ wrapper = shallowMount(BlobEmbeddable, {
+ propsData: {
+ url,
+ },
+ });
+ }
+
+ beforeEach(() => {
+ createComponent();
+ });
+
+ afterEach(() => {
+ wrapper.destroy();
+ });
+
+ it('renders gl-form-input-group component', () => {
+ expect(wrapper.find(GlFormInputGroup).exists()).toBe(true);
+ });
+
+ it('makes up optionValues based on the url prop', () => {
+ expect(wrapper.vm.optionValues).toEqual([
+ { name: 'Embed', value: expect.stringContaining(`${url}.js`) },
+ { name: 'Share', value: url },
+ ]);
+ });
+});