tests for events api