Sha256: c6f6d490ce8ec956d0e8264d2159051ad39d008bd93775b9adb0d5e4b7fa246b

Contents?: true

Size: 650 Bytes

Versions: 14

Compression:

Stored size: 650 Bytes

Contents

require 'spec_helper'
require 'td/client/spec_resources'

describe 'ServerStatus API' do
  include_context 'spec symbols'
  include_context 'common helper'

  let :api do
    API.new(nil, {:max_cumul_retry_delay => -1})
  end

  describe 'server_status' do
    it 'returns status' do
      stub_api_request(:get, '/v3/system/server_status').
        to_return(:body => {'status' => 'OK'}.to_json)
      api.server_status.should == 'OK'
    end

    it 'returns error description' do
      stub_api_request(:get, '/v3/system/server_status').
        to_return(:status => 500)
      api.server_status.should == 'Server is down (500)'
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
td-client-0.8.79 spec/td/client/server_status_api_spec.rb
td-client-0.8.78 spec/td/client/server_status_api_spec.rb
td-client-0.9.0dev2 spec/td/client/server_status_api_spec.rb
td-client-0.9.0dev1 spec/td/client/server_status_api_spec.rb
td-client-0.8.77 spec/td/client/server_status_api_spec.rb
td-client-0.8.76 spec/td/client/server_status_api_spec.rb
td-client-0.8.75 spec/td/client/server_status_api_spec.rb
td-client-0.8.74 spec/td/client/server_status_api_spec.rb
td-client-0.8.73 spec/td/client/server_status_api_spec.rb
td-client-0.8.72 spec/td/client/server_status_api_spec.rb
td-client-0.8.71 spec/td/client/server_status_api_spec.rb
td-client-0.8.70 spec/td/client/server_status_api_spec.rb
td-client-0.8.69 spec/td/client/server_status_api_spec.rb
td-client-0.8.68 spec/td/client/server_status_api_spec.rb