Fix errors in router tests
Check if routes exists before iterating
Merge pull request #306 from jembi/fix-error-messages

Fix empty error messages in tests. Closes #301