spec/unit/braintree/configuration_spec.rb in braintree-2.45.0 vs spec/unit/braintree/configuration_spec.rb in braintree-2.46.0
- old
+ new
@@ -39,9 +39,32 @@
config.merchant_id.should == 'partner_id'
config.public_key.should == 'public_key'
config.private_key.should == 'private_key'
end
+
+ it "raises if combining client_id/secret with access_token" do
+ expect do
+ Braintree::Configuration.new(
+ :client_id => "client_id$development$integration_client_id",
+ :client_secret => "client_secret$development$integration_client_secret",
+ :access_token => "access_token$development$integration_merchant_id$fb27c79dd"
+ )
+ end.to raise_error(Braintree::ConfigurationError, /mixed credential types/)
+ end
+
+ it "raises if combining client_id/secret with public_key/private_key" do
+ expect do
+ Braintree::Configuration.new(
+ :client_id => "client_id$development$integration_client_id",
+ :client_secret => "client_secret$development$integration_client_secret",
+ :merchant_id => "merchant_id",
+ :public_key => "public_key",
+ :private_key => "private_key",
+ :environment => "development"
+ )
+ end.to raise_error(Braintree::ConfigurationError, /mixed credential types/)
+ end
end
describe "base_merchant_path" do
it "returns /merchants/{merchant_id}" do
Braintree::Configuration.instantiate.base_merchant_path.should == "/merchants/integration_merchant_id"