Sha256: 2f3cf851b48b2cdfa0b7373d3b1fdb5565c8a9f39bbd6df71aaf00bfaa7468f7

Contents?: true

Size: 1.11 KB

Versions: 1

Compression:

Stored size: 1.11 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"].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"].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).should == ["SimpleAdapter"]
    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

1 entries across 1 versions & 1 rubygems

Version Path
rhoconnect-3.0.0.beta1 spec/api/source/list_sources_spec.rb