diff options
Diffstat (limited to 'test/net_test.rb')
| -rw-r--r-- | test/net_test.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/net_test.rb b/test/net_test.rb index c4e39e1..3eec454 100644 --- a/test/net_test.rb +++ b/test/net_test.rb @@ -18,6 +18,18 @@ class NetTest < HCl::TestCase assert_equal true, HCl::Net.ssl end + def test_http_deep_unescape + FakeWeb.register_uri(:get, "https://bob:secret@bobclock.harvestapp.com/foo", + :body => Yajl::Encoder.encode({ + status:'gotten & got!', + comparisons:['burrito > taco', 'rain < sun'] + })) + body = HCl::Net.get 'foo' + assert_equal 'gotten & got!', body[:status] + assert_equal 'burrito > taco', body[:comparisons][0] + assert_equal 'rain < sun', body[:comparisons][1] + end + def test_http_get FakeWeb.register_uri(:get, "https://bob:secret@bobclock.harvestapp.com/foo", :body => 'gotten!'.inspect) |
