Sha256: 497d034bf6de8c658f602eb15debab991d91f6f01be0c41c0a50e82bafa9e5f6
Contents?: true
Size: 1.25 KB
Versions: 13
Compression:
Stored size: 1.25 KB
Contents
require File.join(File.dirname(__FILE__),'..','api_helper') describe "RhoconnectApiSetDbDoc" do it_should_behave_like "ApiHelper" do it "should set db document by doc name and data" do data = {'1' => {'foo' => 'bar'}} post "/api/source/set_db_doc", :api_token => @api_token, :doc => 'abc:abc', :data => data last_response.should be_ok verify_result('abc:abc' => data) end it "should set db document by doc name, data type, and data" do data = 'some string' post "/api/source/set_db_doc", :api_token => @api_token, :doc => 'abc:abc:str', :data => data, :data_type => :string last_response.should be_ok verify_result('abc:abc:str' => data) end it "should append data in set db document by doc name and data" do data = {'1' => {'foo' => 'bar'}} data2 = {'2' => {'foo1' => 'bar1'}} data3 = data.merge(data2) post "/api/source/set_db_doc", :api_token => @api_token, :doc => 'abc:abc', :data => data last_response.should be_ok verify_result('abc:abc' => data) post "/api/source/set_db_doc", :api_token => @api_token, :doc => 'abc:abc', :data => data2, :append => true last_response.should be_ok verify_result('abc:abc' => data3) end end end
Version data entries
13 entries across 13 versions & 1 rubygems