Sha256: a35a3d0f5f90e41dc7e8e3d2640ec9953f158477c07d155d659fa30e5b1c0d9e
Contents?: true
Size: 1.83 KB
Versions: 21
Compression:
Stored size: 1.83 KB
Contents
require File.join(File.dirname(__FILE__),'..','api_helper') describe "RhoconnectApiListSourceDocs" do it_should_behave_like "ApiHelper" do it "should list of shared source documents" do sourcename = "SimpleAdapter" user_id = '*' get "/rc/#{Rhoconnect::API_VERSION}/users/#{user_id}/sources/#{sourcename}/docnames", {}, {Rhoconnect::API_TOKEN_HEADER => @api_token} JSON.parse(last_response.body).should == { "md"=>"source:application:__shared__:SimpleAdapter:md", "errors"=>"source:application:__shared__:SimpleAdapter:errors", "md_size"=>"source:application:__shared__:SimpleAdapter:md_size", "md_copy"=>"source:application:__shared__:SimpleAdapter:md_copy"} end it "should list of shared source documents with old route and deprecation warning" do post "/api/list_source_docs", {:source_id => "SimpleAdapter", :user_id => '*'}, {Rhoconnect::API_TOKEN_HEADER => @api_token} JSON.parse(last_response.body).should == { "md"=>"source:application:__shared__:SimpleAdapter:md", "errors"=>"source:application:__shared__:SimpleAdapter:errors", "md_size"=>"source:application:__shared__:SimpleAdapter:md_size", "md_copy"=>"source:application:__shared__:SimpleAdapter:md_copy"} end it "should list user source documents" do sourcename = "SampleAdapter" get "/rc/#{Rhoconnect::API_VERSION}/users/#{@u.id}/sources/#{sourcename}/docnames", {}, {Rhoconnect::API_TOKEN_HEADER => @api_token} JSON.parse(last_response.body).should == { "md"=>"source:application:testuser:SampleAdapter:md", "errors"=>"source:application:testuser:SampleAdapter:errors", "md_size"=>"source:application:testuser:SampleAdapter:md_size", "md_copy"=>"source:application:testuser:SampleAdapter:md_copy"} end end end
Version data entries
21 entries across 21 versions & 1 rubygems