import Enzyme from 'enzyme';
import React from 'react';

import { withDefaultTheme } from '../test/testUtil';
import { ConsentButtons } from './consentButtons';

const testComponent = (language = 'en') => withDefaultTheme(<ConsentButtons
    config={{
        accessToken: "123", 
        apiKey: "123"
    }}
    subject="foo"
    issuer="bar"
    target="baz"
    
    language={language}
/>)

 test('Renders ConsentButtons element', async () => {
    const component = Enzyme.mount(testComponent())

    const title = component.find('[data-type="ConsentButtons"]')
    expect(title.length).toEqual(1)
    component.unmount()
})
