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