Sha256: a949a05d7ebadb3cdae66f2ff1ce860b3441a87ed057c7a396cad5c7f498ca38

Contents?: true

Size: 863 Bytes

Versions: 4

Compression:

Stored size: 863 Bytes

Contents

describe Elastic::AppSearch::Client::Documents do
  include_context 'App Search Credentials'
  include_context 'Static Test Engine'

  let(:client) { Elastic::AppSearch::Client.new(client_options) }

  context 'Documents' do
    describe '#list_documents' do
      context 'when no options are specified' do
        it 'will return all documents' do
          response = client.list_documents(engine_name)
          expect(response['results'].size).to(eq(2))
          expect(response['results'].map { |d| d['id'] }).to(include(document1['id'], document2['id']))
        end
      end

      context 'when options are specified' do
        it 'will return all documents' do
          response = client.list_documents(engine_name, :page => { :size => 1, :current => 2 })
          expect(response['results'].size).to(eq(1))
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
elastic-app-search-7.10.0 spec/list_documents_spec.rb
elastic-app-search-7.9.0 spec/list_documents_spec.rb
elastic-app-search-7.8.0 spec/list_documents_spec.rb
elastic-app-search-7.7.0 spec/list_documents_spec.rb