Test for exception in Jasmine -- From http://stackoverflow.com/questions/4144686/how-to-write-a-test-which-expects-an-error-to-be-thrown