Permalink
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 => '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

Contributor

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.

Contributor

dscataglini replied Apr 3, 2012

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

Contributor

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.