Sha256: bd64f69e4a3b0f362df47c18d31d5c6878387bdc6139ab1bc3629a445480f8c4

Contents?: true

Size: 929 Bytes

Versions: 22

Compression:

Stored size: 929 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
      post "/api/client/get_client_params", {:api_token => @api_token, :client_id =>@c.id}
      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"=>"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

22 entries across 22 versions & 1 rubygems

Version Path
rhoconnect-3.2.1 spec/api/client/get_client_params_spec.rb
rhoconnect-3.2.0 spec/api/client/get_client_params_spec.rb
rhoconnect-3.2.0.beta5 spec/api/client/get_client_params_spec.rb
rhoconnect-3.2.0.beta4 spec/api/client/get_client_params_spec.rb
rhoconnect-3.2.0.beta3 spec/api/client/get_client_params_spec.rb
rhoconnect-3.2.0.beta2 spec/api/client/get_client_params_spec.rb
rhoconnect-3.2.0.beta1 spec/api/client/get_client_params_spec.rb
rhoconnect-3.1.2 spec/api/client/get_client_params_spec.rb
rhoconnect-3.1.1 spec/api/client/get_client_params_spec.rb
rhoconnect-3.1.0 spec/api/client/get_client_params_spec.rb
rhoconnect-3.1.0.beta2 spec/api/client/get_client_params_spec.rb
rhoconnect-3.1.0.beta1 spec/api/client/get_client_params_spec.rb
rhoconnect-3.0.6 spec/api/client/get_client_params_spec.rb
rhoconnect-3.0.5 spec/api/client/get_client_params_spec.rb
rhoconnect-3.0.4 spec/api/client/get_client_params_spec.rb
rhoconnect-3.0.3 spec/api/client/get_client_params_spec.rb
rhoconnect-3.0.2 spec/api/client/get_client_params_spec.rb
rhoconnect-3.0.1 spec/api/client/get_client_params_spec.rb
rhoconnect-3.0.0 spec/api/client/get_client_params_spec.rb
rhoconnect-3.0.0.rc1 spec/api/client/get_client_params_spec.rb