Unit tests for cart methods