Sha256: 2f646ad321905abc65d3b7b8edfb00cfe108524553e08761fb2c4b0b740feff1

Contents?: true

Size: 786 Bytes

Versions: 4

Compression:

Stored size: 786 Bytes

Contents

# Licensed to Elasticsearch B.V under one or more agreements.
# Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
# See the LICENSE file in the project root for more information

require 'spec_helper'

describe 'client#delete_script' do

  let(:expected_args) do
    [
        'DELETE',
        '_scripts/groovy/foo',
        {},
        nil
    ]
  end

  it 'performs the request' do
    expect(client_double.delete_script(lang: 'groovy', id: 'foo')).to eq({})
  end

  context 'when lang parameter is not provided' do

    let(:expected_args) do
      [
          'DELETE',
          '_scripts/foo',
          {},
          nil
      ]
    end

    it 'performs the request' do
      expect(client_double.delete_script(id: 'foo')).to eq({})
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
elasticsearch-api-6.8.3 spec/elasticsearch/api/actions/delete_script_spec.rb
elasticsearch-api-6.8.2 spec/elasticsearch/api/actions/delete_script_spec.rb
elasticsearch-api-7.4.0 spec/elasticsearch/api/actions/delete_script_spec.rb
elasticsearch-api-7.3.0 spec/elasticsearch/api/actions/delete_script_spec.rb