Added test to verify that whenaction works