| 
														
															@@ -7,29 +7,4 @@ class SmartCollectionTest < Test::Unit::TestCase 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     smart_collection = ShopifyAPI::SmartCollection.create(:title => "Macbooks", :rules => rules) 
														 | 
														
														 | 
														
															     smart_collection = ShopifyAPI::SmartCollection.create(:title => "Macbooks", :rules => rules) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     assert_equal 1063001432, smart_collection.id 
														 | 
														
														 | 
														
															     assert_equal 1063001432, smart_collection.id 
														 | 
													
												
											
												
													
														| 
														 | 
														
															   end 
														 | 
														
														 | 
														
															   end 
														 | 
													
												
											
												
													
														| 
														 | 
														
															- 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-  test "Smart Collection get products gets all products in a smart collection" do 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-    fake "smart_collections/1063001432", method: :get, status: 200, body: load_fixture('smart_collection') 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-    smart_collection = ShopifyAPI::SmartCollection.find(1063001432) 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															- 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-    fake "products.json?collection_id=1063001432", 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-      method: :get, 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-      status: 200, 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-      body: 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-      load_fixture('smart_collection_products'), 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-      extension: false 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-    assert_equal [632910392, 921728736], smart_collection.products.map(&:id) 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-  end 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															- 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-  test "Smart Collection get products with only_sorted=only_manual gets only manually sorted products" do 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-    fake "smart_collections/1063001432", method: :get, status: 200, body: load_fixture('smart_collection') 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-    smart_collection = ShopifyAPI::SmartCollection.find(1063001432) 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															- 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-    fake "smart_collections/1063001432/products.json?only_sorted=only_manual", 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-      method: :get, 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-      status: 200, 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-      body: load_fixture('smart_collection_products'), 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-      extension: false 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-    assert_equal [632910392, 921728736], smart_collection.products(only_sorted: "only_manual").map(&:id) 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-  end 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 end 
														 | 
														
														 | 
														
															 end 
														 |