writing tests for favorites and debugging