mozilla/restmail.net — pull request #10 by 6a68 (2013-07-12 00:10:03+00:00)
Title: Handle missing db properly in test and prod. Fixes #4.

@jedp updated, mind merging in?

The `if !db` lines accommodate unit testing without redis running/installed.

Modify those lines to return 200/[] if testing, or 500 if in prod.

If we fill up the redis DB again, or it crashes or whatever, the service will stop infuriatingly telling you you've got zero emails. This is good.