spec/unit/braintree/customer_spec.rb in braintree-2.12.0 vs spec/unit/braintree/customer_spec.rb in braintree-2.13.0
- old
+ new
@@ -39,9 +39,23 @@
Braintree::Customer.create(:first_name => "Joe", :invalid_key => "foo")
end.to raise_error(ArgumentError, "invalid keys: invalid_key")
end
end
+ describe "self.find" do
+ it "raises an exception if the id is blank" do
+ expect do
+ Braintree::Customer.find(" ")
+ end.to raise_error(ArgumentError)
+ end
+
+ it "raises an exception if the id is nil" do
+ expect do
+ Braintree::Customer.find(nil)
+ end.to raise_error(ArgumentError)
+ end
+ end
+
describe "self.update" do
it "raises an exception if hash includes an invalid key" do
expect do
Braintree::Customer.update("customer_id", :first_name => "Joe", :invalid_key => "foo")
end.to raise_error(ArgumentError, "invalid keys: invalid_key")