import siteSubHeader from '@/iss-components/site-sub-header/site-sub-header.vue';
import { shallowMount } from '@vue/test-utils';

// Mock cms helpers
jest.mock('@/helpers/cms-content-helper', () => ({
    doesCopyContainRouterLink: jest.fn()
}));

describe('site sub header', () => {
    const subHeaderText = "let's fix your glass";
    const mockMixin = {
        methods: {
            getCmsContent: jest.fn().mockImplementation(() => subHeaderText)
        }
    };

    it('should contain the cms content', () => {
        const wrapper = shallowMount(siteSubHeader, {
            propsData: {
                justification: '',
                issContainingPage: ''
            },
            mixins: [mockMixin]
        });

        const actual = wrapper.find('span');
        expect(actual.html()).toContain(subHeaderText);
    });
});
