smart_collection_test.rb 434 B

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