Add tests for task filtering routes