This Pull request return a 422 HTTP status and explain the error if you push a notice with bad API key.
I refactor a little spec about ErrorReport to use only him and not dependent of app not really usefull.
Code review are welcome
Add some test to try report issue #470
Add some test with notice send with empty backtrace
Add some test directly in the ErrorReport model
Return an 422 HTTP status code in notice submit when API_KEY is not v…
When a notice is do with an invalid api_key the return is a 404 HTTP
code and no explain about what really happen. Now if you try post a
notice with a bad API_KEY, errbit return a 422 HTTP status code, like
doing by airbrake.
Extract test from spec/model/app to spec/model/error_report
Some test on spec/model/app are too specific to spec/model/error_report
move to this spec
Extract completly the ErrorReport class
Extract all concern about this call to his own class and move test to
Extract some test from controller/noticess to error_report
Fix issue #472
Coverage increased (+0.26%) when pulling 482518e on shingara:features/issue_472 into 6eb59b4 on errbit:master.