mastodon / flodgatt

A blazingly fast drop-in replacement for the Mastodon streaming API server
GNU Affero General Public License v3.0
86 stars 8 forks source link

Add tests for websocket routes #38

Closed codesections closed 5 years ago

codesections commented 5 years ago

This PR adds tests for the websocket routes. In combination with #37, this closes #27—all tests have now been replaced with unit tests. Specifically, every flodgatt contains 54 tests that test every possible route, both SSE and WS. These tests ensure that each request is either rejected (if not authorized) or is correctly parsed into a User that is passed on to ClientAgent.

We do not yet have tests for the functionality in the ClientAgent or Receiver—that is, we aren't testing what we do with the User once it is generated. But that is the obvious next step in increasing testing coverage.