diff options
| author | Zack Hobson | 2013-12-22 23:28:00 -0800 | 
|---|---|---|
| committer | Zack Hobson | 2013-12-22 23:28:00 -0800 | 
| commit | 11310cefb8206487337b8040f9ceb70e570a06f7 (patch) | |
| tree | f9b3624e4210616e48108ff650fa229c125d894d /test/app_test.rb | |
| parent | d315a241dbd6c959085b26a413fc5e40683d63f0 (diff) | |
| parent | b8d0ef7022541999c2267fc7937f2a60e0da602c (diff) | |
| download | hcl-11310cefb8206487337b8040f9ceb70e570a06f7.tar.bz2 | |
Merge pull request #46 from zenhob/faraday
Switch to a Faraday-based JSON API client for Harvest.
Diffstat (limited to 'test/app_test.rb')
| -rw-r--r-- | test/app_test.rb | 6 | 
1 files changed, 3 insertions, 3 deletions
| diff --git a/test/app_test.rb b/test/app_test.rb index 68e3782..1fc1073 100644 --- a/test/app_test.rb +++ b/test/app_test.rb @@ -23,7 +23,7 @@ class AppTest < HCl::TestCase      app = HCl::App.new      throttled = states('throttled').starts_as(false)      app.expects(:show). -      raises(HCl::TimesheetResource::ThrottleFailure, stub(headers:{'Retry-After' => 42})). +      raises(HCl::HarvestMiddleware::ThrottleFailure, {response_headers:{'retry-after' => 42}}).        then(throttled.is(true))      app.expects(:sleep).with(47).when(throttled.is(true))      app.expects(:show).when(throttled.is(true)) @@ -48,7 +48,7 @@ class AppTest < HCl::TestCase    def test_configure_on_auth_failure      app = HCl::App.new      configured = states('configured').starts_as(false) -    app.expects(:show).raises(HCl::TimesheetResource::AuthFailure).when(configured.is(false)) +    app.expects(:show).raises(HCl::HarvestMiddleware::AuthFailure).when(configured.is(false))      app.expects(:ask).returns('xxx').times(4).when(configured.is(false))      app.expects(:write_config).then(configured.is(true))      app.expects(:show).when(configured.is(true)) @@ -58,7 +58,7 @@ class AppTest < HCl::TestCase    def test_api_failure      app = HCl::App.new -    app.expects(:show).raises(HCl::TimesheetResource::Failure) +    app.expects(:show).raises(HCl::HarvestMiddleware::Failure)      app.expects(:exit).with(1)      app.process_args('show').run      assert_match /API failure/i, error_output | 
