Explorar o código

Test for RecurringApplicationCharge 404 response

test case for https://github.com/Shopify/shopify_api/pull/147
justinstern %!s(int64=10) %!d(string=hai) anos
pai
achega
8fd48c1b69
Modificáronse 1 ficheiros con 8 adicións e 0 borrados
  1. 8 0
      test/recurring_application_charge_test.rb

+ 8 - 0
test/recurring_application_charge_test.rb

@@ -104,4 +104,12 @@ class RecurringApplicationChargeTest < Test::Unit::TestCase
     assert_equal [], ShopifyAPI::RecurringApplicationCharge.pending
   end
 
+  def test_recurring_application_charge_not_found_error
+    fake "recurring_application_charges", :body => '{"errors":"Not Found"}', :status => 404
+
+    assert_equal nil, ShopifyAPI::RecurringApplicationCharge.all
+    assert_equal nil, ShopifyAPI::RecurringApplicationCharge.current
+    assert_equal [],  ShopifyAPI::RecurringApplicationCharge.pending
+  end
+
 end