avoinministerio/avoinministerio — pull request #207 by jyrkive (2012-07-31 13:31:13+00:00)
Title: Fix crash in tests

My changes in Pull Request #206 caused a very frequent crash in tests, making dozens of tests to fail. The cause was that the KISSmetrics API key was nil in test environment, and in KM.identify the key was appended to the email address of the current citizen. Appending nil to a string causes a guaranteed crash.

This commit fixes the issue by restoring a piece of code that makes sure that the KISSmetrics API key can't be nil. However, the fallback API key is now an empty string instead of the right key. (The right key is already used in development environment thanks to Pull Request #206.)