cart_test.rb 436 B

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