spec/unit/braintree/configuration_spec.rb in braintree-2.13.0 vs spec/unit/braintree/configuration_spec.rb in braintree-2.13.1
- old
+ new
@@ -9,13 +9,14 @@
@original_environment = Braintree::Configuration.environment
end
after do
Braintree::Configuration.merchant_id = @original_merchant_id
- Braintree::Configuration.public_key = @original_public_key
+ Braintree::Configuration.public_key = @original_public_key
Braintree::Configuration.private_key = @original_private_key
Braintree::Configuration.environment = @original_environment
+ Braintree::Configuration.endpoint = Braintree::Configuration::DEFAULT_ENDPOINT
end
describe "base_merchant_path" do
it "returns /merchants/{merchant_id}" do
Braintree::Configuration.instantiate.base_merchant_path.should == "/merchants/integration_merchant_id"
@@ -178,11 +179,11 @@
Braintree::Configuration.instantiate.protocol.should == "https"
end
end
- describe "self.server" do
+ describe "server" do
it "is localhost for development" do
Braintree::Configuration.environment = :development
Braintree::Configuration.instantiate.server.should == "localhost"
end
@@ -197,9 +198,15 @@
end
it "is qa.braintreegateway.com for qa" do
Braintree::Configuration.environment = :qa
Braintree::Configuration.instantiate.server.should == "qa.braintreegateway.com"
+ end
+
+ it "can by changed by configuring the production endpoint" do
+ Braintree::Configuration.environment = :production
+ Braintree::Configuration.endpoint = "custom-endpoint"
+ Braintree::Configuration.instantiate.server.should == "custom-endpoint.braintreegateway.com"
end
end
describe "ssl?" do
it "returns false for development" do