spec/spec_helper.rb in braintree-2.45.0 vs spec/spec_helper.rb in braintree-2.46.0
- old
+ new
@@ -7,10 +7,11 @@
require "libxml"
braintree_lib = "#{project_root}/lib"
$LOAD_PATH << braintree_lib
require "braintree"
+ require File.dirname(__FILE__) + "/oauth_test_helper"
Braintree::Configuration.environment = :development
Braintree::Configuration.merchant_id = "integration_merchant_id"
Braintree::Configuration.public_key = "integration_public_key"
Braintree::Configuration.private_key = "integration_private_key"
@@ -84,20 +85,23 @@
:public_key => "test_public_key",
:private_key => "test_private_key"
)
def self.make_past_due(subscription, number_of_days_past_due = 1)
- Braintree::Configuration.instantiate.http.put(
- "/subscriptions/#{subscription.id}/make_past_due?days_past_due=#{number_of_days_past_due}"
+ config = Braintree::Configuration.instantiate
+ config.http.put(
+ "#{config.base_merchant_path}/subscriptions/#{subscription.id}/make_past_due?days_past_due=#{number_of_days_past_due}"
)
end
def self.settle_transaction(transaction_id)
- Braintree::Configuration.instantiate.http.put("/transactions/#{transaction_id}/settle")
+ config = Braintree::Configuration.instantiate
+ config.http.put("#{config.base_merchant_path}/transactions/#{transaction_id}/settle")
end
def self.create_3ds_verification(merchant_account_id, params)
- response = Braintree::Configuration.instantiate.http.post("/three_d_secure/create_verification/#{merchant_account_id}", :three_d_secure_verification => params)
+ config = Braintree::Configuration.instantiate
+ response = config.http.post("#{config.base_merchant_path}/three_d_secure/create_verification/#{merchant_account_id}", :three_d_secure_verification => params)
response[:three_d_secure_verification][:three_d_secure_token]
end
def self.stub_time_dot_now(desired_time)
Time.class_eval do