diff options
| author | Zack Hobson | 2013-12-26 11:57:57 -0800 | 
|---|---|---|
| committer | Zack Hobson | 2013-12-26 11:57:57 -0800 | 
| commit | 31dab9e4e892fa3f12e3659cd4b8fa42b52c999d (patch) | |
| tree | 73864167ee88c785ad8b3e891e833cd7230a88a5 /test | |
| parent | edce556e090c2ef2d6459d88d724ce4a05ce8725 (diff) | |
| download | hcl-31dab9e4e892fa3f12e3659cd4b8fa42b52c999d.tar.bz2 | |
use yajl, test html unescape
Diffstat (limited to 'test')
| -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) | 
