Browse files

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

  • Loading branch information...
1 parent 1a54544 commit d845ffdbf994a1205b42116edc27e188916e7909 @ntalbott ntalbott committed Apr 2, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 test/unit/gateways/paypal/paypal_common_api_test.rb
@@ -139,8 +139,8 @@ def test_build_transaction_search_request
:receiver => '',
:first_name => 'Robert'}
request =, 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 '', REXML::XPath.first(request, '//TransactionSearchReq/TransactionSearchRequest/Receiver').text

3 comments on commit d845ffd


ntalbott replied Apr 2, 2012

@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 replied Apr 3, 2012

@ntalbott I guess you didn't see my comments nor pull Shopify#333
I am really sorry you had to fix it your self.


ntalbott replied Apr 4, 2012

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

Please sign in to comment.