diff options
| author | Zack Hobson | 2013-12-22 22:02:32 -0800 |
|---|---|---|
| committer | Zack Hobson | 2013-12-22 22:02:32 -0800 |
| commit | 235b1847badc6c0288caffcc1e9f138c688c9769 (patch) | |
| tree | 06d6a6b16e981f6dc7493a10e49c7bf411f19554 /test/timesheet_resource_test.rb | |
| parent | 50cbd47da7a54a46809a818a43e821431de258ce (diff) | |
| download | hcl-235b1847badc6c0288caffcc1e9f138c688c9769.tar.bz2 | |
rename net test
Diffstat (limited to 'test/timesheet_resource_test.rb')
| -rw-r--r-- | test/timesheet_resource_test.rb | 41 |
1 files changed, 0 insertions, 41 deletions
diff --git a/test/timesheet_resource_test.rb b/test/timesheet_resource_test.rb deleted file mode 100644 index 7397c0e..0000000 --- a/test/timesheet_resource_test.rb +++ /dev/null @@ -1,41 +0,0 @@ -require 'test_helper' - -class TimesheetResourceTest < HCl::TestCase - - def setup - FakeWeb.allow_net_connect = false - HCl::Net.configure \ - 'login' => 'bob', - 'password' => 'secret', - 'subdomain' => 'bobclock', - 'ssl' => true - end - - 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 - end - - def test_http_get - FakeWeb.register_uri(:get, "https://bob:secret@bobclock.harvestapp.com/foo", - :body => 'gotten!'.inspect) - body = HCl::Net.get 'foo' - assert_equal 'gotten!', body - end - - def test_http_post - FakeWeb.register_uri(:post, "https://bob:secret@bobclock.harvestapp.com/foo", - :body => 'posted!'.inspect) - body = HCl::Net.post 'foo', {pizza:'taco'} - assert_equal 'posted!', body - end - - def test_http_delete - FakeWeb.register_uri(:delete, "https://bob:secret@bobclock.harvestapp.com/foo", - :body => 'wiped!'.inspect) - body = HCl::Net.delete 'foo' - assert_equal 'wiped!', body - end -end |
