import React from 'react'; | |
import { render } from '@testing-library/react'; | |
import AutoRedirect from './AutoRedirect'; | |
import { mockWindowLocation } from './testUtils'; | |
describe('Navigation', () => { | |
mockWindowLocation(); | |
it('navigates to seatgeek', () => { | |
render(<AutoRedirect />); | |
expect(window.location.assign).toHaveBeenCalledTimes(1); | |
expect(window.location.assign).toHaveBeenCalledWith( | |
'https://seatgeek.com', | |
); | |
}); | |
}); |