Added tests to cart model. Fixed cart model.