Sha256: 4f2f2e26139f85bdeb12307bc1b51cffac17dbc218a3b1702e044e3afbb1db83

Contents?: true

Size: 486 Bytes

Versions: 10

Compression:

Stored size: 486 Bytes

Contents

require 'spec_helper'

describe MarkLogic::Queries::CollectionQuery do

  describe "#to_xqy" do
    it "should handle a single collection" do
      q = MarkLogic::Queries::CollectionQuery.new("foo")
      expect(q.to_xqy).to eq(%Q{cts:collection-query(("foo"))})
    end

    it "should handle multiple collections" do
      q = MarkLogic::Queries::CollectionQuery.new(["foo", "bar", "baz"])
      expect(q.to_xqy).to eq(%Q{cts:collection-query(("foo","bar","baz"))})
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
marklogic-0.0.11 spec/marklogic/queries/collection_query_spec.rb
marklogic-0.0.10 spec/marklogic/queries/collection_query_spec.rb
marklogic-0.0.9 spec/marklogic/queries/collection_query_spec.rb
marklogic-0.0.8 spec/marklogic/queries/collection_query_spec.rb
marklogic-0.0.7 spec/marklogic/queries/collection_query_spec.rb
marklogic-0.0.6 spec/marklogic/queries/collection_query_spec.rb
marklogic-0.0.5 spec/marklogic/queries/collection_query_spec.rb
marklogic-0.0.4 spec/marklogic/queries/collection_query_spec.rb
marklogic-0.0.3 spec/marklogic/queries/collection_query_spec.rb
marklogic-0.0.1 spec/marklogic/queries/collection_query_spec.rb