tests mini-cart and refactoring