Add tests for events and views