summaryrefslogtreecommitdiff
path: root/spec/frontend/vue_shared/components/runner_instructions/instructions/runner_docker_instructions_spec.js
blob: 2922d261b2469916861c211bc92fd9e7e308d9de (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import { shallowMount } from '@vue/test-utils';

import { GlButton } from '@gitlab/ui';
import RunnerDockerInstructions from '~/vue_shared/components/runner_instructions/instructions/runner_docker_instructions.vue';

describe('RunnerDockerInstructions', () => {
  let wrapper;

  const createComponent = () => {
    wrapper = shallowMount(RunnerDockerInstructions, {});
  };

  const findButton = () => wrapper.findComponent(GlButton);

  beforeEach(() => {
    createComponent();
  });

  it('renders contents', () => {
    expect(wrapper.text().replace(/\s+/g, ' ')).toMatchSnapshot();
  });

  it('renders link', () => {
    expect(findButton().attributes('href')).toBe(
      'https://docs.gitlab.com/runner/install/docker.html',
    );
  });
});