14Plumes / Hexode

MIT License
0 stars 2 forks source link

Tests.init #8

Closed KtorZ closed 8 years ago

KtorZ commented 8 years ago

Writing tests for all endpoints defined in the specs.

KtorZ commented 8 years ago

PR okay to be merged. I implemented the /user/authenticate + fixing tests for that point. I've written down some tests for game creation but they are still pending until the endpoint is completely implemented.

I've also made some important change in models/User (now we directly use and return explicit and exported errors such that the business part can refer to them nicely and handle them properly).

Finally, I added a little middleware that check whether or not a valid token has been provided. (Thought I needed it but not yet. Still I added it to the PR). It's not tested for the moment but should work for Authorization headers of the form token=.

Kisses.