Sha256: 734eca7c0b70ee12ad26ef3abad2659b5f484b082be7686bbfdaa3fff8145b54

Contents?: true

Size: 885 Bytes

Versions: 16

Compression:

Stored size: 885 Bytes

Contents

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

describe "RhosyncApiGetClientParams" do
  it_should_behave_like "ApiHelper"
  
  it "should list client attributes" do
    post "/api/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"=>"phone_id", "value"=>nil, "type"=>"string"},
      {"name"=>"user_id", "value"=>"testuser", "type"=>"string"}, 
      {"name"=>"app_id", "value"=>"application", "type"=>"string"}].sort{|x,y| x['name']<=>y['name']}
  end
  
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
rhosync-2.1.18.beta2 spec/api/get_client_params_spec.rb
rhosync-2.1.18.beta1 spec/api/get_client_params_spec.rb
rhosync-2.1.17 spec/api/get_client_params_spec.rb
rhosync-2.1.17.beta7 spec/api/get_client_params_spec.rb
rhosync-2.1.17.beta6 spec/api/get_client_params_spec.rb
rhosync-2.1.17.beta5 spec/api/get_client_params_spec.rb
rhosync-2.1.17.beta4 spec/api/get_client_params_spec.rb
rhosync-2.1.17.beta3 spec/api/get_client_params_spec.rb
rhosync-2.1.17.beta2 spec/api/get_client_params_spec.rb
rhosync-2.1.17.beta1 spec/api/get_client_params_spec.rb
rhosync-2.1.16 spec/api/get_client_params_spec.rb
rhosync-2.1.15 spec/api/get_client_params_spec.rb
rhosync-2.1.14 spec/api/get_client_params_spec.rb
rhosync-2.1.13 spec/api/get_client_params_spec.rb
rhosync-2.1.12 spec/api/get_client_params_spec.rb
rhosync-2.1.11 spec/api/get_client_params_spec.rb