smart_collection_test.rb 464 B

1234567891011
  1. # frozen_string_literal: true
  2. require 'test_helper'
  3. class SmartCollectionTest < Test::Unit::TestCase
  4. test "Smart Collection creation" do
  5. fake("smart_collections", method: :post, status: 201, body: load_fixture('smart_collection'))
  6. rules = { column: "title", relation: "starts_with", condition: "mac" }
  7. smart_collection = ShopifyAPI::SmartCollection.create(title: "Macbooks", rules: rules)
  8. assert_equal(1063001432, smart_collection.id)
  9. end
  10. end