Sha256: 958f6f91059ded1eadec0ad5e5aeb0e7c0383d2c2e802d9459b659127ecc0b23

Contents?: true

Size: 1.04 KB

Versions: 46

Compression:

Stored size: 1.04 KB

Contents

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

describe "RhosyncApiListSources" do
  it_should_behave_like "ApiHelper"
  
  it "should list all application sources" do
    post "/api/list_sources", {:api_token => @api_token}
    JSON.parse(last_response.body).sort.should == ["SimpleAdapter", "SampleAdapter", "FixedSchemaAdapter"].sort
  end

  it "should list all application sources using partition_type param" do
    post "/api/list_sources", 
      {:api_token => @api_token, :partition_type => 'all'}
    JSON.parse(last_response.body).sort.should == ["SimpleAdapter", "SampleAdapter", "FixedSchemaAdapter"].sort
  end
  
  it "should list app partition sources" do
    post "/api/list_sources", {:api_token => @api_token, :partition_type => :app}
    JSON.parse(last_response.body).should == ["SimpleAdapter"]
  end

  it "should list user partition sources" do
    post "/api/list_sources", {:api_token => @api_token, :partition_type => :user}
    JSON.parse(last_response.body).sort.should == ["SampleAdapter", "FixedSchemaAdapter"].sort
  end
  
end

Version data entries

46 entries across 46 versions & 1 rubygems

Version Path
rhosync-2.1.18.beta2 spec/api/list_sources_spec.rb
rhosync-2.1.18.beta1 spec/api/list_sources_spec.rb
rhosync-2.1.17 spec/api/list_sources_spec.rb
rhosync-2.1.17.beta7 spec/api/list_sources_spec.rb
rhosync-2.1.17.beta6 spec/api/list_sources_spec.rb
rhosync-2.1.17.beta5 spec/api/list_sources_spec.rb
rhosync-2.1.17.beta4 spec/api/list_sources_spec.rb
rhosync-2.1.17.beta3 spec/api/list_sources_spec.rb
rhosync-2.1.17.beta2 spec/api/list_sources_spec.rb
rhosync-2.1.17.beta1 spec/api/list_sources_spec.rb
rhosync-2.1.16 spec/api/list_sources_spec.rb
rhosync-2.1.15 spec/api/list_sources_spec.rb
rhosync-2.1.14 spec/api/list_sources_spec.rb
rhosync-2.1.13 spec/api/list_sources_spec.rb
rhosync-2.1.12 spec/api/list_sources_spec.rb
rhosync-2.1.11 spec/api/list_sources_spec.rb
rhosync-2.1.10 spec/api/list_sources_spec.rb
rhosync-2.1.7 spec/api/list_sources_spec.rb
rhosync-2.1.6 spec/api/list_sources_spec.rb
rhosync-2.1.3 spec/api/list_sources_spec.rb