Asserting function calls with spies