import CCBySA from '@components/atoms/icons/cc-by-sa';
import { render, screen } from '@tests/utils';
import Copyright from './copyright';

const dates = {
  start: '2012',
  end: '2022',
};
const icon = <CCBySA />;
const owner = 'Your name';

describe('Copyright', () => {
  it('renders the copyright owner', () => {
    render(<Copyright dates={dates} icon={icon} owner={owner} />);
    expect(screen.getByText(owner)).toBeInTheDocument();
  });

  it('renders the copyright start date', () => {
    render(<Copyright dates={dates} icon={icon} owner={owner} />);
    expect(screen.getByText(dates.start)).toBeInTheDocument();
  });

  it('renders the copyright end date', () => {
    render(<Copyright dates={dates} icon={icon} owner={owner} />);
    expect(screen.getByText(dates.end)).toBeInTheDocument();
  });

  it('renders the copyright icon', () => {
    render(<Copyright dates={dates} icon={icon} owner={owner} />);
    expect(screen.getByTitle('CC BY SA')).toBeInTheDocument();
  });
});
ue='aa279a6afb67ac4d4a4b5cf5b267a0141055d661'/><select name='h' onchange='this.form.submit();'>
<option value='main' selected='selected'>main</option>
</select> <input type='submit' value='switch'/></form></td></tr>
<tr><td class='sub'>The frontend of my personal website.</td><td class='sub right'>Armand Philippot</td></tr></table>
<table class='tabs'><tr><td>
<a href='/www.armandphilippot.com/about/'>about</a><a href='/www.armandphilippot.com/'>summary</a><a href='/www.armandphilippot.com/refs/?id=aa279a6afb67ac4d4a4b5cf5b267a0141055d661'>refs</a><a href='/www.armandphilippot.com/log/src/components/Icons/Copyright/Copyright.module.scss'>log</a><a class='active' href='/www.armandphilippot.com/tree/src/components/Icons/Copyright/Copyright.module.scss?id=aa279a6afb67ac4d4a4b5cf5b267a0141055d661'>tree</a><a href='/www.armandphilippot.com/commit/src/components/Icons/Copyright/Copyright.module.scss?id=aa279a6afb67ac4d4a4b5cf5b267a0141055d661'>commit</a><a href='/www.armandphilippot.com/diff/src/components/Icons/Copyright/Copyright.module.scss?id=aa279a6afb67ac4d4a4b5cf5b267a0141055d661'>diff</a><a href='/www.armandphilippot.com/stats/src/components/Icons/Copyright/Copyright.module.scss'>stats</a></td><td class='form'><form class='right' method='get' action='/www.armandphilippot.com/log/src/components/Icons/Copyright/Copyright.module.scss'>
<input type='hidden' name='id' value='aa279a6afb67ac4d4a4b5cf5b267a0141055d661'/><select name='qt'>
<option value='grep'>log msg</option>
<option value='author'>author</option>
<option value='committer'>committer</option>
<option value='range'>range</option>
</select>
<input class='txt' type='search' size='10' name='q' value=''/>
<input type='submit' value='search'/>
</form>
</td></tr></table>
<div class='path'>path: <a href='/www.armandphilippot.com/tree/?id=aa279a6afb67ac4d4a4b5cf5b267a0141055d661'>root</a>/<a href='/www.armandphilippot.com/tree/src?id=aa279a6afb67ac4d4a4b5cf5b267a0141055d661'>src</a>/<a href='/www.armandphilippot.com/tree/src/components?id=aa279a6afb67ac4d4a4b5cf5b267a0141055d661'>components</a>/<a href='/www.armandphilippot.com/tree/src/components/Icons?id=aa279a6afb67ac4d4a4b5cf5b267a0141055d661'>Icons</a>/<a href='/www.armandphilippot.com/tree/src/components/Icons/Copyright?id=aa279a6afb67ac4d4a4b5cf5b267a0141055d661'>Copyright</a>/<a href='/www.armandphilippot.com/tree/src/components/Icons/Copyright/Copyright.module.scss?id=aa279a6afb67ac4d4a4b5cf5b267a0141055d661'>Copyright.module.scss</a></div><div class='content'>blob: 8ea801e696bd3661e5ee7cd29b6d7127dd8ba871 (<a href='/www.armandphilippot.com/plain/src/components/Icons/Copyright/Copyright.module.scss?id=aa279a6afb67ac4d4a4b5cf5b267a0141055d661'>plain</a>)
<table summary='blob content' class='blob'>
<tr><td class='linenumbers'><pre><a id='n1' href='#n1'>1</a>
<a id='n2' href='#n2'>2</a>
<a id='n3' href='#n3'>3</a>
<a id='n4' href='#n4'>4</a>
<a id='n5' href='#n5'>5</a>
<a id='n6' href='#n6'>6</a>
<a id='n7' href='#n7'>7</a>
</pre></td>
<td class='lines'><pre><code>