diff options
| author | Zack Hobson | 2013-12-27 13:42:42 -0800 |
|---|---|---|
| committer | Zack Hobson | 2013-12-27 13:44:14 -0800 |
| commit | 7317487adc111ab6f226fc42b57dd6a32cb28541 (patch) | |
| tree | 2053983a5ae51970c9fb89888aa16b3f34b412ee /test/net_test.rb | |
| parent | 4e6cf745e5d8426f1470c26f705bacbad1514e91 (diff) | |
| download | hcl-non-singleton-net.tar.bz2 | |
completely eliminate the global http handle.non-singleton-net
Diffstat (limited to 'test/net_test.rb')
| -rw-r--r-- | test/net_test.rb | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/test/net_test.rb b/test/net_test.rb index 882a09f..94e5ad4 100644 --- a/test/net_test.rb +++ b/test/net_test.rb @@ -3,10 +3,10 @@ require 'test_helper' class NetTest < HCl::TestCase def test_configure - assert_equal 'bob', HCl::Net.login - assert_equal 'secret', HCl::Net.password - assert_equal 'bobclock', HCl::Net.subdomain - assert_equal true, HCl::Net.ssl + assert_equal 'bob', http.login + assert_equal 'secret', http.password + assert_equal 'bobclock', http.subdomain + assert_equal true, http.ssl end def test_http_deep_unescape @@ -14,7 +14,7 @@ class NetTest < HCl::TestCase status:'gotten & got!', comparisons:['burrito > taco', 'rain < sun'] }) - body = HCl::Net.get 'foo' + body = http.get 'foo' assert_equal 'gotten & got!', body[:status] assert_equal 'burrito > taco', body[:comparisons][0] assert_equal 'rain < sun', body[:comparisons][1] @@ -22,19 +22,19 @@ class NetTest < HCl::TestCase def test_http_get register_uri(:get, "/foo", {message:'gotten!'}) - body = HCl::Net.get 'foo' + body = http.get 'foo' assert_equal 'gotten!', body[:message] end def test_http_post register_uri(:post, "/foo", {message:'posted!'}) - body = HCl::Net.post 'foo', {pizza:'taco'} + body = http.post 'foo', {pizza:'taco'} assert_equal 'posted!', body[:message] end def test_http_delete register_uri(:delete, "/foo", {message:'wiped!'}) - body = HCl::Net.delete 'foo' + body = http.delete 'foo' assert_equal 'wiped!', body[:message] end end |
