hummingbird-me / kitsu-tools

:hammer: The tools we use to build Kitsu, the coolest platform for anime and manga
https://kitsu.app
Apache License 2.0
2.09k stars 264 forks source link

server: Improved code coverage for policies and user model #712

Closed aufdetim closed 8 years ago

aufdetim commented 8 years ago

added tests to improve code coverage on app/policies/application_policy.rb, app/models/user.rb, app/policies/library_entry_policy.rb, app/policies/user_policy.rb.

NuckChorris commented 8 years ago

You, sir, are awesome. Specs look fantastic, except that one behavior on user creation (which probably would've been unnoticed without this!)

aufdetim commented 8 years ago

Is there anything you want me to change? I can switch the spec to expect users to not have that permission, but then the test would fail. I'm not very familiar with how the policies work so I wouldn't be confident fixing it.

NuckChorris commented 8 years ago

It's not difficult, and the specs are there to build confidence! It's probably as easy as making create? return !user

NuckChorris commented 8 years ago

Huge props for the coverage boost 🎉