diff options
Diffstat (limited to 'spec/frontend/ci/runner/components/runner_list_header_spec.js')
-rw-r--r-- | spec/frontend/ci/runner/components/runner_list_header_spec.js | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/spec/frontend/ci/runner/components/runner_list_header_spec.js b/spec/frontend/ci/runner/components/runner_list_header_spec.js new file mode 100644 index 00000000000..45823fa6813 --- /dev/null +++ b/spec/frontend/ci/runner/components/runner_list_header_spec.js @@ -0,0 +1,31 @@ +import { shallowMountExtended } from 'helpers/vue_test_utils_helper'; +import RunnerListHeader from '~/ci/runner/components/runner_list_header.vue'; + +describe('RunnerListHeader', () => { + let wrapper; + const createWrapper = (options) => { + wrapper = shallowMountExtended(RunnerListHeader, { + ...options, + }); + }; + + it('shows title', () => { + createWrapper({ + scopedSlots: { + title: () => 'My title', + }, + }); + + expect(wrapper.find('h1').text()).toBe('My title'); + }); + + it('shows actions', () => { + createWrapper({ + scopedSlots: { + actions: () => 'My actions', + }, + }); + + expect(wrapper.text()).toContain('My actions'); + }); +}); |