Added tests for karma views

Fixed #578
Please add a new line at the end of file. This is a [nice convention](http://stackoverflow.com/questions/729692/why-should-files-end-with-a-newline).