Sha256: c2137a3f75a9d698ffe73fb88b1b082f69d19f649724678ddc92295cd2fdcc40

Contents?: true

Size: 1.22 KB

Versions: 1

Compression:

Stored size: 1.22 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", {:app_name => @test_app_name, :api_token => @api_token, :source_id =>"SampleAdapter"}
    JSON.parse(last_response.body).should == [
      {"name"=>"rho__id", "value"=>"SampleAdapter", "type"=>"string"}, 
      {"name"=>"source_id", "value"=>nil, "type"=>"integer"}, 
      {"name"=>"name", "value"=>"SampleAdapter", "type"=>"string"}, 
      {"name"=>"url", "value"=>"", "type"=>"string"}, 
      {"name"=>"login", "value"=>"", "type"=>"string"}, 
      {"name"=>"password", "value"=>"", "type"=>"string"}, 
      {"name"=>"priority", "value"=>3, "type"=>"integer"}, 
      {"name"=>"callback_url", "value"=>nil, "type"=>"string"}, 
      {"name"=>"poll_interval", "value"=>300, "type"=>"integer"}, 
      {"name"=>"partition_type", "value"=>"user", "type"=>"string"}, 
      {"name"=>"sync_type", "value"=>"incremental", "type"=>"string"}, 
      {"name"=>"queue", "value"=>nil, "type"=>"string"}, 
      {"name"=>"query_queue", "value"=>nil, "type"=>"string"}, 
      {"name"=>"cud_queue", "value"=>nil, "type"=>"string"}]
  end
  
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rhosync-2.0.0.beta1 spec/api/get_source_params_spec.rb