Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Use full list of params for blocks

  • Loading branch information...
commit 275977be0b5b45c145e632c2eb0d6fc6496fbeee 1 parent 23d7d2d
@BlakeMesdag BlakeMesdag authored
View
4 test/unit/carriers/canada_post_test.rb
@@ -94,7 +94,7 @@ def test_non_success_parse_rate_response
end
def test_turn_around_time_default
- @carrier.expects(:commit).with do |request|
+ @carrier.expects(:commit).with do |request, options|
parsed_request = Hash.from_xml(request)
parsed_request['eparcel']['ratesAndServicesRequest']['turnAroundTime'] == "24"
end
@@ -102,7 +102,7 @@ def test_turn_around_time_default
end
def test_turn_around_time
- @carrier.expects(:commit).with do |request|
+ @carrier.expects(:commit).with do |request, options|
parsed_request = Hash.from_xml(request)
parsed_request['eparcel']['ratesAndServicesRequest']['turnAroundTime'] == "0"
end
View
4 test/unit/carriers/fedex_test.rb
@@ -33,7 +33,7 @@ def test_turn_around_time_default
Timecop.freeze(today) do
delivery_date = Date.today + 7.days # FIVE_DAYS in fixture response, plus weekend
timestamp = Time.now.iso8601
- @carrier.expects(:commit).with do |request|
+ @carrier.expects(:commit).with do |request, options|
parsed_response = Hash.from_xml(request)
parsed_response['RateRequest']['RequestedShipment']['ShipTimestamp'] == timestamp
end.returns(mock_response)
@@ -49,7 +49,7 @@ def test_turn_around_time
Timecop.freeze(DateTime.new(2013, 3, 11)) do
delivery_date = Date.today + 8.days # FIVE_DAYS in fixture response, plus turn_around_time, plus weekend
timestamp = (Time.now + 1.day).iso8601
- @carrier.expects(:commit).with do |request|
+ @carrier.expects(:commit).with do |request, options|
parsed_response = Hash.from_xml(request)
parsed_response['RateRequest']['RequestedShipment']['ShipTimestamp'] == timestamp
end.returns(mock_response)
Please sign in to comment.
Something went wrong with that request. Please try again.