testing for functions returns in jasmine