Sha256: f37cd377afd5fb0f7b57dcd0d85c6587364d2b5d0464cb768eb037a5b61c3224

Contents?: true

Size: 809 Bytes

Versions: 11

Compression:

Stored size: 809 Bytes

Contents

# frozen_string_literal: true, encoding: ASCII-8BIT

require 'libcouchbase'


describe Libcouchbase::DesignDocs do
    before :each do
        @ddoc = Libcouchbase::Bucket.new.design_docs
    end

    it "should list the available designs" do
        designs = @ddoc.designs
        expect(designs.count).to eq(23)
    end

    it "should list the available views" do
        views = @ddoc.design("user").views
        expect(views).to eq([:is_sys_admin])

        views = @ddoc[:user].views
        expect(views).to eq([:is_sys_admin])
    end

    it "should provide access to view configuration" do
        config = @ddoc.design("user").view_config
        expect(config.keys).to eq([:is_sys_admin])

        config = @ddoc[:user].view_config
        expect(config.keys).to eq([:is_sys_admin])
    end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
libcouchbase-0.3.1 spec/design_docs_spec.rb
libcouchbase-0.2.0 spec/design_docs_spec.rb
libcouchbase-0.1.0 spec/design_docs_spec.rb
libcouchbase-0.0.9 spec/design_docs_spec.rb
libcouchbase-0.0.8 spec/design_docs_spec.rb
libcouchbase-0.0.7 spec/design_docs_spec.rb
libcouchbase-0.0.6 spec/design_docs_spec.rb
libcouchbase-0.0.5 spec/design_docs_spec.rb
libcouchbase-0.0.4 spec/design_docs_spec.rb
libcouchbase-0.0.3 spec/design_docs_spec.rb
libcouchbase-0.0.2 spec/design_docs_spec.rb