Sha256: e64efda6c913eaa703dbff72c3dcc2662e7b140b534928c9e498af09e46b4ac2

Contents?: true

Size: 1.17 KB

Versions: 21

Compression:

Stored size: 1.17 KB

Contents

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

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

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

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

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

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
rhoconnect-3.2.1 spec/api/source/list_sources_spec.rb
rhoconnect-3.2.0 spec/api/source/list_sources_spec.rb
rhoconnect-3.2.0.beta5 spec/api/source/list_sources_spec.rb
rhoconnect-3.2.0.beta4 spec/api/source/list_sources_spec.rb
rhoconnect-3.2.0.beta3 spec/api/source/list_sources_spec.rb
rhoconnect-3.2.0.beta2 spec/api/source/list_sources_spec.rb
rhoconnect-3.2.0.beta1 spec/api/source/list_sources_spec.rb
rhoconnect-3.1.2 spec/api/source/list_sources_spec.rb
rhoconnect-3.1.1 spec/api/source/list_sources_spec.rb
rhoconnect-3.1.0 spec/api/source/list_sources_spec.rb
rhoconnect-3.1.0.beta2 spec/api/source/list_sources_spec.rb
rhoconnect-3.1.0.beta1 spec/api/source/list_sources_spec.rb
rhoconnect-3.0.6 spec/api/source/list_sources_spec.rb
rhoconnect-3.0.5 spec/api/source/list_sources_spec.rb
rhoconnect-3.0.4 spec/api/source/list_sources_spec.rb
rhoconnect-3.0.3 spec/api/source/list_sources_spec.rb
rhoconnect-3.0.2 spec/api/source/list_sources_spec.rb
rhoconnect-3.0.1 spec/api/source/list_sources_spec.rb
rhoconnect-3.0.0 spec/api/source/list_sources_spec.rb
rhoconnect-3.0.0.rc1 spec/api/source/list_sources_spec.rb