Sha256: 672e7710aa35ecd6ebb0e9472b7083277b646c5fbde6fcda82e85fbdbc740224

Contents?: true

Size: 1.02 KB

Versions: 12

Compression:

Stored size: 1.02 KB

Contents

require 'test_helper'

class CustomerSavedSearchTest < Test::Unit::TestCase
  def setup
    super
    load_customer_saved_search
  end

  def test_get_customers_from_customer_saved_search
    fake 'customers.json?customer_saved_search_id=8899730', :body => load_fixture('customer_saved_search_customers'), :extension => false
    assert_equal 1, @customer_saved_search.customers.length
    assert_equal 112223902, @customer_saved_search.customers.first.id
  end

  def test_get_customers_from_customer_saved_search_with_params
    fake 'customers.json?customer_saved_search_id=8899730&limit=1', :body => load_fixture('customer_saved_search_customers'), :extension => false
    customers = @customer_saved_search.customers(:limit => 1)
    assert_equal 1, customers.length
    assert_equal 112223902, customers.first.id
  end

  private
  def load_customer_saved_search
    fake 'customer_saved_searches/8899730', :body => load_fixture('customer_saved_search')
    @customer_saved_search = ShopifyAPI::CustomerSavedSearch.find(8899730)
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
shopify_api-3.2.5 test/customer_saved_search_test.rb
shopify_api-3.2.4 test/customer_saved_search_test.rb
shopify_api-3.2.3 test/customer_saved_search_test.rb
shopify_api-3.2.2 test/customer_saved_search_test.rb
shopify_api-3.2.1 test/customer_saved_search_test.rb
shopify_api-3.2.0 test/customer_saved_search_test.rb
shopify_api-3.1.8 test/customer_saved_search_test.rb
shopify_api-3.1.7 test/customer_saved_search_test.rb
shopify_api-3.1.6 test/customer_saved_search_test.rb
shopify_api-3.1.5 test/customer_saved_search_test.rb
shopify_api-3.1.3 test/customer_saved_search_test.rb
shopify_api-3.1.2 test/customer_saved_search_test.rb