update test to use jasmine spy #8454