Sha256: 18e89259d51cf7187005ff6f383544728e14b99db9018ab28e8b642943a10b67

Contents?: true

Size: 1019 Bytes

Versions: 13

Compression:

Stored size: 1019 Bytes

Contents

require File.join(File.dirname(__FILE__),'..','api_helper')

describe "RhoconnectApiGetClientParams" do
  it_should_behave_like "ApiHelper" do
    it "should list client attributes" do
      get "/rc/#{Rhoconnect::API_VERSION}/clients/#{@c.id}",  {}, {Rhoconnect::API_TOKEN_HEADER => @api_token}
      res = JSON.parse(last_response.body)
      res.delete_if { |attrib| attrib['name'] == 'rho__id' || attrib['name'] == 'last_sync'}
      res.sort{|x,y| x['name']<=>y['name']}.should == [
        {"name"=>"device_type", "value"=>"Apple", "type"=>"string"}, 
        {"name"=>"device_pin", "value"=>"abcd", "type"=>"string"}, 
        {"name"=>"device_port", "value"=>"3333", "type"=>"string"},
        {"name"=>"device_push_type", "type"=>"string", "value"=>nil}, 
        {"name"=>"user_id", "value"=>"testuser", "type"=>"string"}, 
        {"name"=>"phone_id", "value"=>nil, "type"=>"string"},
        {"name"=>"app_id", "value"=>"application", "type"=>"string"}].sort{|x,y| x['name']<=>y['name']}
    end
  end  
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
rhoconnect-3.4.5 spec/api/client/get_client_params_spec.rb
rhoconnect-3.4.4 spec/api/client/get_client_params_spec.rb
rhoconnect-3.4.3 spec/api/client/get_client_params_spec.rb
rhoconnect-3.4.2 spec/api/client/get_client_params_spec.rb
rhoconnect-3.3.6 spec/api/client/get_client_params_spec.rb
rhoconnect-3.3.5 spec/api/client/get_client_params_spec.rb
rhoconnect-3.3.4 spec/api/client/get_client_params_spec.rb
rhoconnect-3.3.3 spec/api/client/get_client_params_spec.rb
rhoconnect-3.3.2 spec/api/client/get_client_params_spec.rb
rhoconnect-3.3.1 spec/api/client/get_client_params_spec.rb
rhoconnect-3.3.1.beta4 spec/api/client/get_client_params_spec.rb
rhoconnect-3.3.1.beta3 spec/api/client/get_client_params_spec.rb
rhoconnect-3.3.1.beta2 spec/api/client/get_client_params_spec.rb