summaryrefslogtreecommitdiffstats
path: root/test/net_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/net_test.rb')
-rw-r--r--test/net_test.rb16
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 &amp; got!',
comparisons:['burrito &gt; taco', 'rain &lt; 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