Skip to content

Instantly share code, notes, and snippets.

@x37v
Created September 17, 2010 16:52
Show Gist options
  • Save x37v/584522 to your computer and use it in GitHub Desktop.
Save x37v/584522 to your computer and use it in GitHub Desktop.
test "paypal validation helper" do
address = "1 Main St"
zipcode = 95131
emails = %w{
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
}
emails.each do |email|
res = UserValidationsHelper::paypal_address_verify(email, address, zipcode)
assert res != :fail, "Failed to validate email against paypal"
assert res != :timeout, "Timeout while validating email against paypal"
assert res["CONFIRMATIONCODE"].downcase == "confirmed", "Address should be confirmed"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment