Sha256: 1401f4b10edc8de64cc5c5591b392acffd3dee5a132c3ab902e3130fe09fa56f

Contents?: true

Size: 835 Bytes

Versions: 4

Compression:

Stored size: 835 Bytes

Contents

# frozen_string_literal: true, encoding: ASCII-8BIT

require 'mt-libcouchbase'


describe MTLibcouchbase::DesignDocs, design_docs: true do
    before :each do
        @ddoc = MTLibcouchbase::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

4 entries across 4 versions & 1 rubygems

Version Path
mt-libcouchbase-1.4.03 spec/design_docs_spec.rb
mt-libcouchbase-1.4.02 spec/design_docs_spec.rb
mt-libcouchbase-1.4.01 spec/design_docs_spec.rb
mt-libcouchbase-1.4.0 spec/design_docs_spec.rb