Sha256: f1f1f9b5ca521bcc6e103414720cb254488f697277b7b69e946d2794a8fd5530

Contents?: true

Size: 691 Bytes

Versions: 49

Compression:

Stored size: 691 Bytes

Contents

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

describe "RhosyncApiGetDbDoc" do
  it_should_behave_like "ApiHelper"
  
  it "should return db document by name" do
    data = {'1' => {'foo' => 'bar'}}
    set_state('abc:abc' => data)
    post "/api/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/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

Version data entries

49 entries across 49 versions & 1 rubygems

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