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