Bläddra i källkod

Add a teardown to clear Fakeweb, fix incorrect test

John Duff 13 år sedan
förälder
incheckning
fbf9007af2
2 ändrade filer med 5 tillägg och 1 borttagningar
  1. 4 0
      test/test_helper.rb
  2. 1 1
      test/variant_test.rb

+ 4 - 0
test/test_helper.rb

@@ -38,6 +38,10 @@ class Test::Unit::TestCase
     ShopifyAPI::Base.password = nil
     ShopifyAPI::Base.user = nil
   end
+
+  def teardown
+    FakeWeb.clean_registry
+  end
   
   # Custom Assertions
   def assert_not(expression)

+ 1 - 1
test/variant_test.rb

@@ -11,7 +11,7 @@ class VariantTest < Test::Unit::TestCase
   def test_get_variant_namespaced
     fake "products/632910392/variants/808950810", :method => :get, :body => load_fixture('variant')
 
-    v = ShopifyAPI::Variant.find(808950810)
+    v = ShopifyAPI::Variant.find(808950810, :params => {:product_id => 632910392})
   end
 
   def test_get_variant