Jasmine test for new method