Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Simple(minded) fix for timezone issue in PayPal API test.

  • Loading branch information...
commit d845ffdbf994a1205b42116edc27e188916e7909 1 parent 1a54544
@ntalbott ntalbott authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 test/unit/gateways/paypal/paypal_common_api_test.rb
View
4 test/unit/gateways/paypal/paypal_common_api_test.rb
@@ -139,8 +139,8 @@ def test_build_transaction_search_request
:receiver => 'foo@example.com',
:first_name => 'Robert'}
request = REXML::Document.new(@gateway.send(:build_transaction_search, options))
- assert_equal '2012-02-21T05:00:00Z', REXML::XPath.first(request, '//TransactionSearchReq/TransactionSearchRequest/StartDate').text
- assert_equal '2012-03-21T04:00:00Z', REXML::XPath.first(request, '//TransactionSearchReq/TransactionSearchRequest/EndDate').text
+ assert_match %r{^2012-02-21T\d{2}:00:00Z$}, REXML::XPath.first(request, '//TransactionSearchReq/TransactionSearchRequest/StartDate').text
+ assert_match %r{^2012-03-21T\d{2}:00:00Z$}, REXML::XPath.first(request, '//TransactionSearchReq/TransactionSearchRequest/EndDate').text
assert_equal 'foo@example.com', REXML::XPath.first(request, '//TransactionSearchReq/TransactionSearchRequest/Receiver').text
end

3 comments on commit d845ffd

@ntalbott
Collaborator

@dscataglini for now I'm just using a Regex to get the test to pass CI; if you have a better fix, I'll gladly merge a PR.

@dscataglini

@ntalbott I guess you didn't see my comments https://github.com/Shopify/active_merchant/pull/328/files#r636392 nor pull #333
I am really sorry you had to fix it your self.

@ntalbott
Collaborator

No worries - just hacked something in to turn the build green so we didn't have to rush.

Please sign in to comment.
Something went wrong with that request. Please try again.