Created
April 12, 2010 22:38
-
-
Save chrisfinne/364074 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def test_ascii_http_post | |
first_name = "joe" + ("X" * 1000) # pad the field to help get the URL over the 2000 length limit so AWS uses a POST | |
last_name = "blow" + ("X" * 1000) # pad the field to help get the URL over the 2000 length limit so AWS uses a POST | |
mm = MyModel.create :first_name=>first_name, :last_name=>last_name | |
mm.save | |
sleep 1 | |
assert mm.first_name == first_name | |
assert mm.last_name == last_name | |
mm2 = MyModel.find(mm.id) | |
assert mm2.first_name == first_name | |
assert mm2.last_name == last_name | |
end | |
def test_utf8_http_post | |
first_name = "josé" + ("X" * 1000) # pad the field to help get the URL over the 2000 length limit so AWS uses a POST | |
last_name = "本語" + ("X" * 1000) # pad the field to help get the URL over the 2000 length limit so AWS uses a POST | |
mm = MyModel.create :first_name=>first_name, :last_name=>last_name | |
mm.save | |
sleep 1 | |
assert mm.first_name == first_name | |
assert mm.last_name == last_name | |
mm2 = MyModel.find(mm.id) | |
assert mm2.first_name == first_name | |
assert mm2.last_name == last_name | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment