Sha256: 9721fb30bd505bd05068752907c5596f37f579c24ff2165c9ff8d9429a2d6256

Contents?: true

Size: 749 Bytes

Versions: 22

Compression:

Stored size: 749 Bytes

Contents

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

describe "RhoconnectApiGetDbDoc" do
  it_should_behave_like "ApiHelper" do
    it "should return db document by name" do
      data = {'1' => {'foo' => 'bar'}}
      set_state('abc:abc' => data)
      post "/api/source/get_db_doc", :api_token => @api_token, :doc => 'abc:abc'
      last_response.should be_ok
      JSON.parse(last_response.body).should == data
    end

    it "should return db document by name and data_type" do
      data = 'some string'
      set_state('abc:abc' => data)
      post "/api/source/get_db_doc", :api_token => @api_token, :doc => 'abc:abc', :data_type => :string
      last_response.should be_ok
      last_response.body.should == data
    end
  end  
end

Version data entries

22 entries across 22 versions & 1 rubygems

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