Sha256: 337450addea239f1e1ff8338de795fe25a7a3d9aeb824bc806390acf1bc099af

Contents?: true

Size: 828 Bytes

Versions: 20

Compression:

Stored size: 828 Bytes

Contents

# frozen_string_literal: true, encoding: ASCII-8BIT

require 'libcouchbase'


describe Libcouchbase::DesignDocs, design_docs: true 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

20 entries across 20 versions & 2 rubygems

Version Path
libcouchbase-mapo-1.4.1 spec/design_docs_spec.rb
libcouchbase-1.3.2 spec/design_docs_spec.rb
libcouchbase-1.3.0 spec/design_docs_spec.rb
libcouchbase-1.2.8 spec/design_docs_spec.rb
libcouchbase-1.2.7 spec/design_docs_spec.rb
libcouchbase-1.2.6 spec/design_docs_spec.rb
libcouchbase-1.2.5 spec/design_docs_spec.rb
libcouchbase-1.2.4 spec/design_docs_spec.rb
libcouchbase-1.2.3 spec/design_docs_spec.rb
libcouchbase-1.2.2 spec/design_docs_spec.rb
libcouchbase-1.2.1 spec/design_docs_spec.rb
libcouchbase-1.2.0 spec/design_docs_spec.rb
libcouchbase-1.1.1 spec/design_docs_spec.rb
libcouchbase-1.1.0 spec/design_docs_spec.rb
libcouchbase-1.0.4 spec/design_docs_spec.rb
libcouchbase-1.0.3 spec/design_docs_spec.rb
libcouchbase-1.0.2 spec/design_docs_spec.rb
libcouchbase-1.0.1 spec/design_docs_spec.rb
libcouchbase-1.0.0 spec/design_docs_spec.rb
libcouchbase-0.3.3 spec/design_docs_spec.rb