cart_test.rb 405 B

12345678910111213
  1. require 'test_helper'
  2. class CartTest < Test::Unit::TestCase
  3. test 'all should return all carts' do
  4. fake 'carts'
  5. carts = ShopifyAPI::Cart.all
  6. assert_equal carts.size, 2
  7. assert_equal 2, carts.first.id
  8. assert_equal "3eed8183d4281db6ea82ee2b8f23e9cc", carts.first.token
  9. assert_equal 1, carts.first.line_items.size
  10. assert_equal 'test', carts.first.line_items.first.title
  11. end
  12. end