Sha256: fa33dbc909f0e8244d4b6bd88e949d5bb24705a830e388b4bd13d8892dcd514d

Contents?: true

Size: 1.83 KB

Versions: 9

Compression:

Stored size: 1.83 KB

Contents

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

describe "RhoconnectApiGetSourceParams" do

  it_should_behave_like "ApiHelper" do
  
    it "should list source attributes" do
      source_id = "SampleAdapter"
      get "/rc/#{Rhoconnect::API_VERSION}/sources/#{source_id}", {}, {Rhoconnect::API_TOKEN_HEADER => @api_token}
      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"=>1, "type"=>"integer"}, 
        {"name"=>"callback_url", "value"=>nil, "type"=>"string"}, 
        {"name"=>"poll_interval", "value"=>300, "type"=>"integer"},
        {"name"=>"retry_limit", "type"=>"integer", "value"=>0},
        {"name"=>"simulate_time", "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"=>"pass_through", "value"=>nil, "type"=>"string"}, 
        {"name"=>"cud_queue", "value"=>nil, "type"=>"string"}].sort {|x,y| y["name"] <=> x["name"] }
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
rhoconnect-3.3.6 spec/api/source/get_source_params_spec.rb
rhoconnect-3.3.5 spec/api/source/get_source_params_spec.rb
rhoconnect-3.3.4 spec/api/source/get_source_params_spec.rb
rhoconnect-3.3.3 spec/api/source/get_source_params_spec.rb
rhoconnect-3.3.2 spec/api/source/get_source_params_spec.rb
rhoconnect-3.3.1 spec/api/source/get_source_params_spec.rb
rhoconnect-3.3.1.beta4 spec/api/source/get_source_params_spec.rb
rhoconnect-3.3.1.beta3 spec/api/source/get_source_params_spec.rb
rhoconnect-3.3.1.beta2 spec/api/source/get_source_params_spec.rb