overleaf/services/web/test/frontend/features/settings/components/newsletter-section.test.tsx
Timothée Alby 3c124667ba Merge pull request #7751 from overleaf/ta-settings-misc-section-split
[SettingsPage] Split Misc Section

GitOrigin-RevId: b6fc60c571dfaf3aec542f3df8dc826a0ba3ab58
2022-04-27 08:05:08 +00:00

16 lines
513 B
TypeScript

import { expect } from 'chai'
import { screen, render } from '@testing-library/react'
import NewsletterSection from '../../../../../frontend/js/features/settings/components/newsletter-section'
describe('<NewsletterSection />', function () {
it('shows link to sessions', async function () {
render(<NewsletterSection />)
const link = screen.getByRole('link', {
name: 'Manage Your Newsletter Preferences',
})
expect(link.getAttribute('href')).to.equal('/user/email-preferences')
})
})