Sha256: 12c38d95e79994cc8ec8599eb80e880f49dad4e59458bb09bfb4400eb77214d0

Contents?: true

Size: 1.59 KB

Versions: 13

Compression:

Stored size: 1.59 KB

Contents

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

describe "RhosyncApiGetSourceParams" do
  it_should_behave_like "ApiHelper"
  
  it "should list source attributes" do
    post "/api/get_source_params", {:api_token => @api_token, :source_id =>"SampleAdapter"}
    result = JSON.parse(last_response.body).sort {|x,y| y["name"] <=> x["name"] }
    result.should == [
      {"name"=>"rho__id", "value"=>"SampleAdapter", "type"=>"string"}, 
      {"name"=>"source_id", "value"=>nil, "type"=>"integer"}, 
      {"name"=>"name", "value"=>"SampleAdapter", "type"=>"string"}, 
      {"name"=>"url", "value"=>"http://example.com", "type"=>"string"}, 
      {"name"=>"login", "value"=>"testuser", "type"=>"string"}, 
      {"name"=>"password", "value"=>"testpass", "type"=>"string"}, 
      {"name"=>"priority", "value"=>3, "type"=>"integer"}, 
      {"name"=>"callback_url", "value"=>nil, "type"=>"string"}, 
      {"name"=>"poll_interval", "value"=>300, "type"=>"integer"},
      {"name"=>"retry_limit", "value"=>0, "type"=>"integer"},
      {"name"=>"partition_type", "value"=>"user", "type"=>"string"}, 
      {"name"=>"sync_type", "value"=>"incremental", "type"=>"string"}, 
      {"name"=>"belongs_to", "type"=>"string", "value"=>nil},
      {"name"=>"has_many", "type"=>"string", "value"=>"FixedSchemaAdapter,brand"},
      {"name"=>"id", "value"=>"SampleAdapter", "type"=>"string"}, 
      {"name"=>"queue", "value"=>nil, "type"=>"string"}, 
      {"name"=>"query_queue", "value"=>nil, "type"=>"string"}, 
      {"name"=>"cud_queue", "value"=>nil, "type"=>"string"}].sort {|x,y| y["name"] <=> x["name"] }
  end
  
end

Version data entries

13 entries across 13 versions & 1 rubygems

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